Welcome! Log In Create A New Profile

Advanced

WB - ReturnToCapture Inside A Looper

WB - ReturnToCapture Inside A Looper
May 18, 2020 03:38PM
Hi All

I have one edit control that has a 999.99 mask - numbers only.

I have another edit control with a mask of text only.

When I use the tab and shift-tab the focus moves to the number and text control just fine *and* when on the edit control it defaults to overwriting the existing control - blue background and when typing the existing code is replaced. The same works tor text only.

Now here is my problem. When I use ReturnToCapture to the number edit control works as expected - overwrites existing data BUT when I ReturnToCapture to the text edit control the cursor is placed at the beginning of the edit control and text is not replaced but inserted.

No idea if there is a simple solution to this - hoping there is.

Cheers
André
Al
Re: WB - ReturnToCapture Inside A Looper
May 18, 2020 05:18PM
Hello Andre

The first thing I would check is that the text control is ticked as "AutomaticErase"

If it is and it is not working on the ReturnToCapture() then maybe the ..AutomaticErase could be used to set the mode on the control before the ReturnToCapture() command is issued


Regards
Al
Re: WB - ReturnToCapture Inside A Looper
May 18, 2020 08:25PM
Hi Al

Thanks for that. It looks as though that would have done it but it is sadly not available in WB.

Still checking how I can force this behaviour - without it users are going to tear their hair out.

Still investigating.....

Cheers
André
Re: WB - ReturnToCapture Inside A Looper
May 18, 2020 10:11PM
You have to get the size of the data in your text field and position the curser yourself.
I have done this but not near a computer for a day or so to share code.
But very Doable.

windev help curser property

DW



Edited 1 time(s). Last edit at 05/18/2020 10:14PM by cabinetman.
Re: WB - ReturnToCapture Inside A Looper
May 19, 2020 12:23AM
Hi DW

No available in WB - this is the nuts and bolts of the problem. And this function is sooooooo native to the browser - the mind boggles that there is not support for it.

Cheers
André
Re: WB - ReturnToCapture Inside A Looper
May 22, 2020 02:06AM
Sorted - had to write a whole bunch of javascript - dropped returntocapture altogether.

They definitely need an autoerase function that simply calls a javascript method that works with most browsers, the more common ones at least. I am quite gobsmacked that they do not have this considering how old and mature WB is.

Cheers
André
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: