Selecting text in single-line entry fields - small UI issue
paul at livecode.org
Fri Jan 29 14:32:45 EST 2016
The best I can come up with is using the openField and closeField messages to set the colour of the line within the field, instead of setting the background colour of the field, this gives you a little more control over the position of the ‘highlighted' area. Something like this in a behaviour button then applied to the required fields:
set the hilitecolor of me to Blue
set the backgroundcolor of line 1 of me to the hilitecolor of me
set the padding of line 1 of me to 4
set the textColor of me to "255,255,255"
select the text of me
set the backgroundcolor of line 1 of me to "255,255,255"
set the textColor of me to "0,0,0"
Sorry I can’t test for the disappearing text because I’m on Mac.
As Jacque suggested, I also expected the focusIn and focusOut messages would be helpful, but it seems they are not triggered buy opening or closing an unlocked field (see comment in the dictionary).
This lesson explains a little more so maybe helpful:
More information about the Use-livecode