Selecting text in single-line entry fields - small UI issue

Roland Huettmann roland.huettmann at gmail.com
Fri Jan 29 12:38:30 EST 2016


Hello J. Thank you. Helpful. Especially the triggers mentioned.

Unfortunately the focusborder property does not work in WIndows. In the
Dictionary Window 92 is mentioned (uh...?) but it also does not work in 8.1
(and I guess in Windows 10). Of course I can set the borderwidth and
bordercolor when entering the field and when exiting it.

WINDOWS:

It seems that this problem loosing the selection (I had this before in
older versions) is gone. Or at least, currently I do not have this any
longer. That is already very fortunate! (I remember that this was the
reason why I worked with the tabkey solution to keep the focus on the field
not loosing the selection. I was wondering why I did it.Yes, it was this
problem loosing the selection before.

I love the way some fields in other programs are selecting the text. Look
at FileMaker. Setting the field property selecting the field content means
that the whole field is showing a selection, not just the text. Such
examples make it clear, not my many words ).

Here is my test button to try to indicate the selection changing the
backgroundcolor:

on mouseUp
   if the shiftkey is down then
      set the texthilite of field test3 to white
      set the backgroundcolor of field test3 to black
      select the text of field test3 // NOTHING IS SHOWN but the text is
there
   else
      set the texthilite of field test3 to black
      set the backgroundcolor of field test3 to white
      select the text of field test3 // NOTHING IS SHOWN but the text is
there
   end if
end mouseUp

In both cases, it does not work. The text disappears ! So, it also
disappears when tabbing into the field. Only selecting the text manually it
will show, and reverse the selection color.

All I am trying to explain is that the current way of text selection is not
looking as nice as the field selection in other programs. And I would like
to work on such level of detail. It is not critical to have it. I agree.

So far this effect seems only possible using a transparent field on top of
another control, and this control behind shows the selection in the same
color as the text selection so that the visual effect is as I want it. It
can even be made small enough so that the visual effect will be associated
with the actual text and the whole width of the selected field. But it is
neither perfect, nor desirable to use such work-around everywhere as even a
transparent or empty selectioncolor shows off and looks disturbing or just
not quite right. And it is not really the text selection itself (which is
hidden here using the same selectioncolor as the control behind but still
not completely unnoticed).

I assume now that what I am trying to achieve is currently not possible. I
hope that it will be possible to do on such level of detail using widgets.
I did not explored these new possibilities yet. And I need more guidance to
learn LCB. )))

Roland



More information about the use-livecode mailing list