FutureBasic Logo

<<    Index    >> FutureBasic

PopUpButton   statement / function

Statement syntax
popupbutton tag, enabled, index, items, rect, pullsDown, wndTag

Function syntax
index = popupbutton(tag)

The popupbutton statement puts a new popupbutton in the current output window, or alters an existing popupbutton's characteristics. The popupbutton function returns the index of the control's selected item and is equivalent to calling fn PopUpButtonIndexOfSelectedItem.

tag A number (1 through 1000000) that you assign when you create the popupbutton and that you refer to when altering the button. The number you assign must be different from the tag value of all other existing widgets in the current window. A negative tag hides the popupbutton.
enabled A boolean value which specifies whether the popupbutton should be enabled or disabled.
index The index of the popupbutton's selected item.
items A semicolon-delimited list or array of item titles. A dash ('-') inserts a menu separator item.
rect The popupbutton's enclosing rectangle. This can be specified in either of two ways:
(i) (x,y,w,h) where x,y are the origin and w,h the size of the button.
(ii) A CGRect value
pullsDown A boolean value to indicate if the popupbutton displays a pull-down menu.
wndTag An optional parameter for when the popupbutton's window is not the current output window. Note specifying this parameter does not bring the window to the front or make it the output window.
Dialog event

Apple documentation