Putting a list into menuitems of a combo box button

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
Glenn Boyce
Posts: 137
Joined: Thu Jul 24, 2008 11:22 pm

Putting a list into menuitems of a combo box button

Post by Glenn Boyce » Sun Jul 27, 2008 9:34 pm

Does anyone know what is the syntax for putting a list of menu items into the menuitem of a combo box button?
cheers, Glenn

BvG
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 1239
Joined: Sat Apr 08, 2006 1:10 pm
Contact:

Post by BvG » Sun Jul 27, 2008 10:31 pm

From your description I'd assume you want something like this:

Code: Select all

on mouseUp
  put "choice1, choice2,choice3" into theList
  replace comma with return in theList
  set the text of button "name of combo box" to theList
end mouseUp
The text of a menu button is the list of choices. the label of that menu button is the current choice. However, some styles of menu buttons do not have a current selection, so they lack the label part.
Also note that setting the choice to something is often a bit more complicated.
Various teststacks and stuff:
http://bjoernke.com

Chat with other RunRev developers:
chat.freenode.net:6666 #livecode

Post Reply