To keep the selection of a textfield visible while the focus is onanother control?

jonathandlynch at gmail.com jonathandlynch at gmail.com
Sun Jun 6 09:56:23 EDT 2010


Rather than simulating text highlighting, try simulating the change in focus.

The actual focus would always stay on the field. However, you could use a custom prop to define a pseudofocus.

When that property is set to a different object, like the combo box, then text gets diverted (using key down handler) to that object.

It would be tricky, including the need to simulate the blinking text cursor, but it should be doable.

Good luck,
J



Sent from my Verizon Wireless BlackBerry

-----Original Message-----
From: "G. Wolfgang Gaich" <gwolfgang at gaich.de>
Date: Sat, 05 Jun 2010 16:02:57 
To: How to use Revolution<use-revolution at lists.runrev.com>
Subject: To keep the selection of a textfield visible while the focus is on
 another control?

Hi all,

I don't know how to manage this:

On a card I have a field with text and a combo box.
With the combobox the user can change the textsize of the selected text 
of the textfield.
That works good when I set the traversalOn of the combobox to false.
The User then can use the menu of the combobox while the selection in 
the textfield keeps visible.
But when I set the traversalOn of the combobox to true, so that the user 
can manually enter a textsize in the field part of the combobox, the 
selection in the textfield disappears because the textfield lost its focus.

One way I tested was to store the selectedChunk in a custom property on 
selectionchanged and when the user has entered the textsize in the 
combobox and presses return or enter the textsize and the selection for 
the selectedchunk (I stored in the custom property) of the field is set.
But there is a period of time the user doesn't see his selection in the 
textfield.

Is there a way to keep the selection of a textfield visible while the 
focus is on another control?

I hope you understand my request despite my poor english.

Thank you very much in advance.

Wolfgang
_______________________________________________
use-revolution mailing list
use-revolution at lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


More information about the Use-livecode mailing list