FutureBasic Logo

<<    Index    >> FutureBasic

ComboBox   statement / function



Statement syntax
combobox tag, enabled, items, text, rect, wndTag

Function syntax
text = combobox(tag)

Description
The combobox statement puts a new combobox in the current output window, or alters an existing combobox's characteristics. The combobox function returns the box's currently displayed text as a CFStringRef and is equivalent to calling fn ControlStringValue.

Parameters
Parameter
Description
tag A number (1 through 1000000) that you assign when you create the combobox and that you refer to when altering or closing the combobox. 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 combobox.
enabled A boolean value which specifies whether the combobox should be enabled or disabled.
items A list of items to be added to the combobox. This can be an array or semicolon-delimited string of items.
text The text to be displayed in the combobox.
rect The combobox'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 combobox.
(ii) A CGRect value
wndTag An optional parameter for when the combobox'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 events
textfield
_comboBoxSelectionDidChange
_comboBoxSelectionIsChanging
_comboBoxWillDismiss
_comboBoxWillPopUp
 
Apple documentation
NSComboBox
NSComboBoxDelegate
NSComboBoxDataSource