Hi.
I have tryed a lot, and looked on LC-lessons about fields and more.
I have a list Field.
I want a script to run IF a line are selected in the field.
What is the "syntax" to look at?
I have tryed:
If selected.
If hilitedline
if hilited
Maby its something like Visual Basic with the GotFocus command?
Check if List Field selected?
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Re: Check if List Field selected?
Hi,
Close.
The "hilitedLines". See the dictionary.
Craig newman
Close.
The "hilitedLines". See the dictionary.
Craig newman
Re: Check if List Field selected?
Please note that hilitedLines will tell you the line number of the line selected, but not give you the contents of the line. To do that, you need to use the selectedText function or a chunk expression like (assuming your code is within the list Field script:
.
Additionally, checking whether the hilitedLines of a list field is empty is how you would determine whether or not to take action like you are asking. So, in the mouseUp handler within your list field script:
Tom
Code: Select all
answer line (the hilitedLines of me) of me
Additionally, checking whether the hilitedLines of a list field is empty is how you would determine whether or not to take action like you are asking. So, in the mouseUp handler within your list field script:
Code: Select all
on mouseUp
if the hilitedLines of me is not empty then
--put your code here
end if
end mouseUp
Re: Check if List Field selected?
Hi appman,
please check these stacks to ge the basics of Livecode:
http://www.hyperactivesw.com/revscriptc ... ences.html
Maybe you should start with stack "Controls"
Best
Klaus
please check these stacks to ge the basics of Livecode:
http://www.hyperactivesw.com/revscriptc ... ences.html
Maybe you should start with stack "Controls"

Best
Klaus