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

2016-01-29 Thread Roland Huettmann
Sorry -  mistyped: I wanted to write: "Is it possible ?"

On 29 January 2016 at 11:45, Roland Huettmann 
wrote:

> Question: textcolor when text is selected
>
> It is possible to set the textcolor when the text is hilited? I could not
> find a way doing this.
>
> Roland
>
>
>
> On 29 January 2016 at 10:21, Roland Huettmann 
> wrote:
>
>> Paul, yes, autohilite does it. ) But nevertheless, to perform some
>> action, I need a trigger while tabbing.
>>
>> I am using LC 7.1, Windows 8.1
>>
>> The actual question was another one:
>>
>> The text is highlighted - yes - in both cases.
>>
>> But the single-line field rectangle is not, just the text itself.
>>
>> I would like to have the visual effect showing a fully highlighted field
>> (not the text itself) where the text is visible and selected - and ideally
>> the color showing is set apart more than just 1 pixel from the border of
>> the field boundaries.
>>
>> This simply looks better than a chunk of text being selected.
>>
>> This can somehow be done tabbing into the field and then setting the
>> backgroundcolor of field.
>>
>> But setting the backgroundcolor to the hilitecolor will make the text
>> chunk disappear.
>>
>> Example:
>>
>> // The text chunk only appears when tabbing out or deselecting it.
>> Setting the hilitecolor to empty does not make a difference. //
>>
>> on tabkey
>>set the hilitecolor of field "Test1" to blue
>>set the backgroundcolor of field "Test1" to the hilitecolor of field
>> "Test1"
>>select the text of field "Test1" // The text DISAPPEARS
>> end tabkey
>>
>> One way of achieving the desired effect is with a trick:
>>
>> Set the actual field to be transparent. Put a graphic or another control
>> (field..) behind. Selecting the text of the transparent field will change
>> the color of the control behind it and the visual effect will be as desired
>> if the hilitecolor is set to the same color as the backgroundcolor in the
>> control behind.
>>
>> But of course - this is not something I would like to do for all my
>> fields. )
>>
>> Roland
>>
>>
>>
>>
>>
>>
>>
>> On 28 January 2016 at 22:26, Paul Hibbert  wrote:
>>
>>> On Jan 28, 2016, at 4:07 AM, Roland Huettmann <
>>> roland.huettm...@gmail.com> wrote:
>>> >
>>> > 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
>>> > should occur?
>>>
>>> Check the autoTab property in the inspector, or if you want to set it by
>>> script…
>>>
>>> set the autoTab of field “myField" to true
>>>
>>> I’m not seeing any issue with text changing colour when selected, but
>>> you didn’t say which version of Livecode or which platform you are seeing
>>> this on, this info may help track down the problem.
>>>
>>> Paul
>>> ___
>>> use-livecode mailing list
>>> use-livecode@lists.runrev.com
>>> Please visit this url to subscribe, unsubscribe and manage your
>>> subscription preferences:
>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>
>>
>>
>
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

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

2016-01-29 Thread Roland Huettmann
Question: textcolor when text is selected

It is possible to set the textcolor when the text is hilited? I could not
find a way doing this.

Roland



On 29 January 2016 at 10:21, Roland Huettmann 
wrote:

> Paul, yes, autohilite does it. ) But nevertheless, to perform some action,
> I need a trigger while tabbing.
>
> I am using LC 7.1, Windows 8.1
>
> The actual question was another one:
>
> The text is highlighted - yes - in both cases.
>
> But the single-line field rectangle is not, just the text itself.
>
> I would like to have the visual effect showing a fully highlighted field
> (not the text itself) where the text is visible and selected - and ideally
> the color showing is set apart more than just 1 pixel from the border of
> the field boundaries.
>
> This simply looks better than a chunk of text being selected.
>
> This can somehow be done tabbing into the field and then setting the
> backgroundcolor of field.
>
> But setting the backgroundcolor to the hilitecolor will make the text
> chunk disappear.
>
> Example:
>
> // The text chunk only appears when tabbing out or deselecting it. Setting
> the hilitecolor to empty does not make a difference. //
>
> on tabkey
>set the hilitecolor of field "Test1" to blue
>set the backgroundcolor of field "Test1" to the hilitecolor of field
> "Test1"
>select the text of field "Test1" // The text DISAPPEARS
> end tabkey
>
> One way of achieving the desired effect is with a trick:
>
> Set the actual field to be transparent. Put a graphic or another control
> (field..) behind. Selecting the text of the transparent field will change
> the color of the control behind it and the visual effect will be as desired
> if the hilitecolor is set to the same color as the backgroundcolor in the
> control behind.
>
> But of course - this is not something I would like to do for all my
> fields. )
>
> Roland
>
>
>
>
>
>
>
> On 28 January 2016 at 22:26, Paul Hibbert  wrote:
>
>> On Jan 28, 2016, at 4:07 AM, Roland Huettmann 
>> wrote:
>> >
>> > 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
>> > should occur?
>>
>> Check the autoTab property in the inspector, or if you want to set it by
>> script…
>>
>> set the autoTab of field “myField" to true
>>
>> I’m not seeing any issue with text changing colour when selected, but you
>> didn’t say which version of Livecode or which platform you are seeing this
>> on, this info may help track down the problem.
>>
>> Paul
>> ___
>> use-livecode mailing list
>> use-livecode@lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>
>
>
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

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

2016-01-29 Thread Roland Huettmann
Paul, yes, autohilite does it. ) But nevertheless, to perform some action,
I need a trigger while tabbing.

I am using LC 7.1, Windows 8.1

The actual question was another one:

The text is highlighted - yes - in both cases.

But the single-line field rectangle is not, just the text itself.

I would like to have the visual effect showing a fully highlighted field
(not the text itself) where the text is visible and selected - and ideally
the color showing is set apart more than just 1 pixel from the border of
the field boundaries.

This simply looks better than a chunk of text being selected.

This can somehow be done tabbing into the field and then setting the
backgroundcolor of field.

But setting the backgroundcolor to the hilitecolor will make the text chunk
disappear.

Example:

// The text chunk only appears when tabbing out or deselecting it. Setting
the hilitecolor to empty does not make a difference. //

on tabkey
   set the hilitecolor of field "Test1" to blue
   set the backgroundcolor of field "Test1" to the hilitecolor of field
"Test1"
   select the text of field "Test1" // The text DISAPPEARS
end tabkey

One way of achieving the desired effect is with a trick:

Set the actual field to be transparent. Put a graphic or another control
(field..) behind. Selecting the text of the transparent field will change
the color of the control behind it and the visual effect will be as desired
if the hilitecolor is set to the same color as the backgroundcolor in the
control behind.

But of course - this is not something I would like to do for all my fields.
)

Roland







On 28 January 2016 at 22:26, Paul Hibbert  wrote:

> On Jan 28, 2016, at 4:07 AM, Roland Huettmann 
> wrote:
> >
> > 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
> > should occur?
>
> Check the autoTab property in the inspector, or if you want to set it by
> script…
>
> set the autoTab of field “myField" to true
>
> I’m not seeing any issue with text changing colour when selected, but you
> didn’t say which version of Livecode or which platform you are seeing this
> on, this info may help track down the problem.
>
> Paul
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

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

2016-01-29 Thread J. Landman Gay
The focusborder property will outline the currently active field with a color. 
If you use that, you won't have to set the field's backcolor. 

If you do want to script the behavior, you can use either the openfield or 
focusIn message as the trigger. When focus is lost, a focusOut message is sent 
as well as either closefield or exitfield, which you can use to reset the field 
appearance. 

I've had to work around the disappearing selection text on Windows before (it 
doesn't happen on Mac) and found that for black text, the best background color 
is a pale shade. I think I used a very light yellow. 

On January 29, 2016 3:21:29 AM CST, Roland Huettmann 
 wrote:
>Paul, yes, autohilite does it. ) But nevertheless, to perform some
>action,
>I need a trigger while tabbing.
>
>I am using LC 7.1, Windows 8.1
>
>The actual question was another one:
>
>The text is highlighted - yes - in both cases.
>
>But the single-line field rectangle is not, just the text itself.
>
>I would like to have the visual effect showing a fully highlighted
>field
>(not the text itself) where the text is visible and selected - and
>ideally
>the color showing is set apart more than just 1 pixel from the border
>of
>the field boundaries.
>
>This simply looks better than a chunk of text being selected.
>
>This can somehow be done tabbing into the field and then setting the
>backgroundcolor of field.
>
>But setting the backgroundcolor to the hilitecolor will make the text
>chunk
>disappear.
>
>Example:
>
>// The text chunk only appears when tabbing out or deselecting it.
>Setting
>the hilitecolor to empty does not make a difference. //
>
>on tabkey
>   set the hilitecolor of field "Test1" to blue
>   set the backgroundcolor of field "Test1" to the hilitecolor of field
>"Test1"
>   select the text of field "Test1" // The text DISAPPEARS
>end tabkey
>
>One way of achieving the desired effect is with a trick:
>
>Set the actual field to be transparent. Put a graphic or another
>control
>(field..) behind. Selecting the text of the transparent field will
>change
>the color of the control behind it and the visual effect will be as
>desired
>if the hilitecolor is set to the same color as the backgroundcolor in
>the
>control behind.
>
>But of course - this is not something I would like to do for all my
>fields.
>)
>
>Roland
>
>
>
>
>
>
>
>On 28 January 2016 at 22:26, Paul Hibbert  wrote:
>
>> On Jan 28, 2016, at 4:07 AM, Roland Huettmann
>
>> wrote:
>> >
>> > 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
>> > should occur?
>>
>> Check the autoTab property in the inspector, or if you want to set it
>by
>> script…
>>
>> set the autoTab of field “myField" to true
>>
>> I’m not seeing any issue with text changing colour when selected, but
>you
>> didn’t say which version of Livecode or which platform you are seeing
>this
>> on, this info may help track down the problem.
>>
>> Paul
>> ___
>> use-livecode mailing list
>> use-livecode@lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>___
>use-livecode mailing list
>use-livecode@lists.runrev.com
>Please visit this url to subscribe, unsubscribe and manage your
>subscription preferences:
>http://lists.runrev.com/mailman/listinfo/use-livecode

-- 
Jacqueline Landman Gay | jac...@hyperactivesw.com
HyperActive Software   | http://www.hyperactivesw.com

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

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

2016-01-29 Thread Roland Huettmann
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
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


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

2016-01-29 Thread Paul Hibbert
Roland,

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:

on openField
   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
end openField

on exitField
   set the backgroundcolor of line 1 of me to "255,255,255"
   set the textColor of me to "0,0,0"
end exitField

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:
http://lessons.livecode.com/m/4071/l/58674-how-do-i-style-paragraphs-in-a-field-in-livecode-5-5

Paul
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

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

2016-01-28 Thread Paul Hibbert
On Jan 28, 2016, at 4:07 AM, Roland Huettmann  
wrote:
> 
> 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
> should occur?

Check the autoTab property in the inspector, or if you want to set it by script…

set the autoTab of field “myField" to true

I’m not seeing any issue with text changing colour when selected, but you 
didn’t say which version of Livecode or which platform you are seeing this on, 
this info may help track down the problem.

Paul
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

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

2016-01-28 Thread Roland Huettmann
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
should occur?

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.

The problem:

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
disappear.

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 ?)

Roland


P.S.
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@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


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

2016-01-28 Thread dunbarx
Hi.


I have not looked carefully at your coloring issues, but put this in the card 
script:



on openField
   select the text of the target
end openField


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.


Craig Newman



-Original Message-
From: Roland Huettmann <roland.huettm...@gmail.com>
To: How to use LiveCode <use-livecode@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
should occur?

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.

The problem:

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
disappear.

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 ?)

Roland


P.S.
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@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode