Selecting text in single-line entry fields - small UI issue
dunbarx at aol.com
dunbarx at aol.com
Thu Jan 28 09:21:17 EST 2016
I have not looked carefully at your coloring issues, but put this in the card script:
select the text of the target
Can you think of a way to do this with the tab key message? Anyway, with either of those, you can also vet the target field itself, skipping those that might not be of interest, or re-directing to specific fields.
From: Roland Huettmann <roland.huettmann at gmail.com>
To: How to use LiveCode <use-livecode at lists.runrev.com>
Sent: Thu, Jan 28, 2016 7:09 am
Subject: Selecting text in single-line entry fields - small UI issue
This is a small issue, not critical. Nevertheless, I am curious to know if
there is a solution.
In almost all cases, tabbing from single-line entry field to single-line
entry field, I prefer selecting the whole text instead of having the
pointer mark after the text. It allows to quickly enter new values and
overwriting existing ones.
Maybe I am missing something, but I need to script this with "on
tabkey"-event handlers, "on textchanged" handlers, " on deletekey" handlers
and go with "select the text of..." or "select line 1 of...". Otherwise the
cursor is always placed behind the text - and I do not want that except for
multi-line fields. Could there not be a built-in attribute how selection
Now, for visually appealing reasons, I like to not just have the text
selected, but indicate that the field as such is highlighted.
Using the standard blue selection color, and tabbing into a field, I have
set the background color of that field to the selection color, and when
leaving the field, I reset the color to what it as before.
As long as the text in the field is selected, the text is hidden, but it is
actually white and should show on the blue field. Clicking into the field
will also show it as desired. Using a yellow or other color is possible,
but it does not do what I want to achieve.For strange reasons, selecting
the text and setting the background color accordingly makes the text
Well, ideally I like the single-line field control to fully show this type
of selection, the text showing white (or black) depending on the selection
color, and even the field control with a white outline of 1 to 3 pixels
around the colored inside of the field. That the text itself is selected
does not have to be visual in this case.
It simply looks better and I find it also in most other programs.
(Maybe the new widgets technology will give us more fine-tuning.even on
"simple" entry fields..Will there be new field controls ?)
And if there were an easy way of formatting the field (numbers, dates,
etc:) without having to resort to front scripts and all that, just setting
inbuilt attributes, it would just make me too happy. Because most of the
time I am spending with such UI issues. (I know there are formatting field
packages and I am also doing that. Just it is such a common and basic task
that it would really be a big advantage to have it supported)
use-livecode mailing list
use-livecode at lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
More information about the Use-livecode