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.
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
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
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,
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
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
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
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
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
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
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
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
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
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
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
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
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
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
18 matches
Mail list logo