Re: Field highlited

2023-07-15 Thread Mark Smith via use-livecode
The effective attribute is what I was looking for. As Paul mentioned, if you just say “set the background of… to hiliteColor” you don’t get anything. But if you set it to the “effective hiliteColor” you get the system default (btw, I tried “system hiliteColor” but LC treats it as a syntax error.

Re: Field highlited

2023-07-15 Thread Richmond via use-livecode
It is really very easy to do this sort of thing: set the hilitecolor of fld "f1" to red Best, Richmond. On 14.07.23 23:39, J. Landman Gay via use-livecode wrote: On 7/14/23 11:14 AM, Mark Smith via use-livecode wrote: BTW, is there a way of determining the default highlight colour? The dict

Re: Field highlited

2023-07-14 Thread J. Landman Gay via use-livecode
On 7/14/23 11:14 AM, Mark Smith via use-livecode wrote: BTW, is there a way of determining the default highlight colour? The dictionary says: "By default, the global hiliteColor property is set to the system highlight color." I'd guess yours is blue. That's pretty standard on Mac. -- Jacque

Re: Field highlited

2023-07-14 Thread Paul Dupuis via use-livecode
Use the effective keyword as in: put the effective hiliteColor of field X into tHiliteColor It will figure out the color by inheritance. If you just put the hiliteColor of field X  (without it being set specifically for field X) your get empty On 7/14/2023 12:14 PM, Mark Smith wrote: BTW,

Re: Field highlited

2023-07-14 Thread Mark Smith via use-livecode
BTW, is there a way of determining the default highlight colour? When I select some text in a field it highlights to a light blue color, but I can’t find where that color is set. Thanks Mark > On 13 Jul 2023, at 11:01 pm, Paul Dupuis via use-livecode > wrote: > > On 7/12/2023 6:21 PM, Paul

Re: Field highlited

2023-07-13 Thread ambassador--- via use-livecode
Paul Dupuis wrote:   > I have a LC9 field object - just a scrolling field (not a list field) with > a lot of text. The user selects some text and then click a button near > the field. I want the selection to remain highlighted, but when you  > click outside the field the highlight goes away. Any s

Re: Field highlited

2023-07-13 Thread Paul Dupuis via use-livecode
On 7/12/2023 6:21 PM, Paul Dupuis via use-livecode wrote: I have a LC9 field object - just a scrolling field (not a list field) with a lot of text. The user selects some text and then click a button near the field. I want the selection to remain highlighted, but when you click outside the field

Re: Field highlited

2023-07-13 Thread J. Landman Gay via use-livecode
On 7/13/23 2:58 PM, J. Landman Gay via use-livecode wrote: On 7/13/23 1:18 PM, Mark Smith via use-livecode wrote: Hi Paul, try “the selectedText". Whaddya know...it works! Another way is to turn off traversalOn in the button. That prevents the focus from changing. Actually, I've been tryi

Re: Field highlited

2023-07-13 Thread J. Landman Gay via use-livecode
On 7/13/23 1:18 PM, Mark Smith via use-livecode wrote: Hi Paul, try “the selectedText". Whaddya know...it works! Another way is to turn off traversalOn in the button. That prevents the focus from changing. -- Jacqueline Landman Gay | jac...@hyperactivesw.com HyperActive Software

Re: Field highlited

2023-07-13 Thread Mark Smith via use-livecode
Hi Paul, try “the selectedText". Create a scrolling text field, call it fld1, and put a large amount of text in it. Create 2 buttons: one with “on mouse down, answer “Hello World” and the other with “on mouse down, answer the selectedText of field “fld1” Now highlight an area of text in fld1. C

Re: Field highlited

2023-07-13 Thread Richmond via use-livecode
I just did this: on mouseLeave    put the selectedText of fld "f1" into fld "f2" end mouseLeave you can then do whatever you want with your button on the basis of the contents of fld "f2" Best, Richmond. On 13.07.23 20:20, Bob Sneidar via use-livecode wrote: Correction: on openField pu

Re: Field highlited

2023-07-13 Thread Bob Sneidar via use-livecode
Correction: on openField put long id of the target into pField if the savedChunk of pField is not empty then put the savedChunk of pField into tSelection select tSelection Set the savedChunk of pField to empty end if pass openField end openField > On Jul 13, 2023, at

Re: Field highlited

2023-07-13 Thread Bob Sneidar via use-livecode
Untested This in a frontScript: on openField put long id of the target into pField set the selection to the savedChunk of pField — if you want to restore the last selection Set the savedChunk of pField to empty pass openField end openField on exitField put the long id of the ta

Re: Field highlited

2023-07-13 Thread Paul Dupuis via use-livecode
Thank your Bob, Craig, and William for the responses. It appears the way I have done it in the past is the "best" option. I was hoping there was some clever trick I don't know, but it is what it is. I'll do what I have done before. Thanks again. On 7/12/2023 6:21 PM, Paul Dupuis via use-liveco

Re: Field highlited

2023-07-13 Thread William Prothero via use-livecode
Folks, A possible strategy is to change the color of a line in a field, when it is selected. There would need to be a script that could simply returns the content of a line of a specified color, changes the color to "unselected", or whatever your need requires. You could have multiple lines sele

Re: Field highlited

2023-07-13 Thread Craig Newman via use-livecode
Paul. I think that Bob S. is correct. The change in focus is sort of built into the engine, and a field cannot “remember” such a thing. A fun kludge would be to create one or more overlays, however you like those to look, and apply them to the field of interest. These overlays can be managed in

Re: Field highlited

2023-07-13 Thread Bob Sneidar via use-livecode
I do not see how that could work. In Windows, buttons can have the focus, which means a field would always lose it. What I do when I need something like this is I save the selection (or selectedChunk or some such thing) as a property of the field upon exitField. You could even put that in a fr

Field highlited

2023-07-12 Thread Paul Dupuis via use-livecode
I have a LC9 field object - just a scrolling field (not a list field) with a lot of text. The user selects some text and then click a button near the field. I want the selection to remain highlighted, but when you click outside the field the highlight goes away. Any simple solutions to this. S