Easy way to fill in combo box, option menu, pop up menu, dro
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Easy way to fill in combo box, option menu, pop up menu, dro
I can successfully create these by typing the choice into the property inspector and then using switch statements inside the code. The problem is that I want to make a huge one with like 300+ choices and all of that work would be very tedious. Is there an easier way to get a list of options into there? I can get the list separated by next line then I could paste that list into the inspector. When the user clicks a choice I would like to put that exact word into a variable.
Re: Easy way to fill in combo box, option menu, pop up menu,
Also I'm not sure the property inspector would recognize a list separated by enter as separate options it may just try to make the whole list one large option
-
- VIP Livecode Opensource Backer
- Posts: 153
- Joined: Thu Jun 29, 2006 4:16 pm
Re: Easy way to fill in combo box, option menu, pop up menu,
Assuming I’m understanding you correctly….
You could type all of the lines into an LC field and then put this script into a button:
set the text of button "OptionDemo" to field “OptionList"
Or, create multiple custom properties in the option button itself and then use a script like this:
set the text of button "OptionDemo" to the cOptionListOne of button "OptionDemo"
You could type all of the lines into an LC field and then put this script into a button:
set the text of button "OptionDemo" to field “OptionList"
Or, create multiple custom properties in the option button itself and then use a script like this:
set the text of button "OptionDemo" to the cOptionListOne of button "OptionDemo"
-
- VIP Livecode Opensource Backer
- Posts: 9648
- Joined: Wed May 06, 2009 2:28 pm
- Location: New York, NY
Re: Easy way to fill in combo box, option menu, pop up menu,
Hi.
Making 300 or even 300,000 menuItems in an optionMenu is easy, even if you don't know what to include in the list.
But making the user navigate such a beast is cruel and unusual.
So we must, simply must re-think the UI. Can these go into subcategories, so that a hierarchal menu would do? Can we do almost anything else at all?
Craig Newman.
Making 300 or even 300,000 menuItems in an optionMenu is easy, even if you don't know what to include in the list.
Code: Select all
on mouseUp
lock screen
repeat with y = 1 to 300
put "XYZ" & y into line y of btn "yourOption"
end repeat
end mouseUpt
So we must, simply must re-think the UI. Can these go into subcategories, so that a hierarchal menu would do? Can we do almost anything else at all?
Craig Newman.