Page 1 of 1

Setting the lines of a button to a list...

Posted: Thu Oct 03, 2013 12:20 am
by rrBUSS9EE
Hey...

I have a return delimited list of commands I would like to set the lines of a button to. I know I can:

repeat with L=1 to the number of lines of theList
set line L of button 1 to line L of theList
end repeat

But isn't there some property I can just set to the list? Can't seem to find one.

Re: Setting the lines of a button to a list...

Posted: Thu Oct 03, 2013 3:38 am
by dunbarx
Hi.

"Lines of a button"

--Do you mean the contents of, say, a pullDown button, so that the list contents becomes the choices of that button?

Code: Select all

put yourList into btn "yourButton"
A button is also a container, the contents of which are read by LC as the choices in a menu-style button.

--Do you mean set the script? The script is a property, and you can:

Code: Select all

set the script of btn "yourButton" to yourList.
Or do you mean something entirely different?

Craig Newman

Re: Setting the lines of a button to a list...

Posted: Thu Oct 03, 2013 5:14 pm
by rrBUSS9EE
Thanks. The first example is what I was looking for as I am populating the button for a contextual menu.