Option Menus
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Option Menus
I have an option menu that is populated with some values. How would I be able to clear all the lines of the option menu, when I am ready to repopulate the whole list of options?
Is there detailed documentation on how to use option menus?
Is there detailed documentation on how to use option menus?
Re: Option Menus
To clear the menu items in the option menu
then put your new list of things into it...
Code: Select all
put empty into button "theNameOfThebutton"
Code: Select all
put "Able,Baker,Charlie,Delta" into theNewList
repeat with count = 1 to the number of items of theNewList
put item count of theNewList & cr after button "theNameOfThebutton"
end repeat
Re: Option Menus
Thanks, I did try
However, it puts the button name into the first option line. Right now I have it as:
Not ideal, but it works...
Code: Select all
put empty into btn ...
Code: Select all
put "-" into btn ....
Re: Option Menus
Yes it will do that... my fault.
Re: Option Menus
You could put "space" or an invisible character..
Craig Newman
Craig Newman
Re: Option Menus
Simpler way:Dixie wrote:To clear the menu items in the option menuthen put your new list of things into it...Code: Select all
put empty into button "theNameOfThebutton"
Code: Select all
put "Able,Baker,Charlie,Delta" into theNewList repeat with count = 1 to the number of items of theNewList put item count of theNewList & cr after button "theNameOfThebutton" end repeat
Code: Select all
put "Able,Baker,Charlie,Delta" into theNewList
replace "," with cr in theNewlist
put theNewList into button "theNameOfTheButton"
Marek