set selectedText?
Kaveh Bazargan
kaveh at focalimage.com
Thu Nov 18 09:31:04 EST 2004
At 2:54 pm +0100 18/11/04, Martin Baxter wrote:
[...]
>I do it like this:
>
>set the wholematches to true
>put lineoffset("one",btn 1) into lnum
>if lnum > 0 then
> set the menuhistory of btn 1 to lnum
>end if
>
>You can use the selectedtext to find out what the selectedtext is, but I
>don't think you can set it as the selectedtext is a function not a property.
>
>If you change the label of the option button, this changes what the user
>sees, but it doesn't change the selection.
>
>So if a button's menuhistory is 1, and line 1 of the button contains the
>text "Line one", changing the label of the button to "Line two" changes
>what the user sees, but the menuhistory property is still 1 and the
>selectedtext still returns "Line 1"
>
>Of course this may or may not be an issue depending on the circumstances.
>
>I hope that makes sense :-)
Thank you Martin and Klaus. In my case I think I'll use this method, as I
have another handler checking the selectedText later, and label won't do
it. I've learn several new keywords here too. :-)
--
Kaveh Bazargan
http://www.focalimage.com/
http://www.holographer.org/
More information about the use-livecode
mailing list