EZPopUpMenu is wrapper class which creates an (optional) label and a popUpMenu. It includes per item actions as well as a global action which are both evaluated upon selection of an item. Convenience methods for inserting and deleting menu items are also included . If the parent is nil, then EZPopUpMenu will create its own window.See EZGui and EZLists for all of the options.
The convenience methods for EZPopUpMenu require that the items array is an array of associations of labels and functions, not like in PopUpMenu, where items is simply an array of strings. If label
is nil
, then no staticText is created.
parentView |
The parent view or window. If the parent is nil, then EZPopUpMenu will create its own Window, and place it conveniently on the screen if the bounds are a Point. If the bounds are a Rect, then the Rect determines the window bounds. |
bounds | |
label |
The label. Default value is |
items |
Default value is |
globalAction |
A global function to be performed in addition to the item functions |
initVal |
Initial value of the menu, i.e. the index selected. Default value is 0. |
initAction |
An instance of Boolean. Performs the action at |
labelWidth |
Default value is 80. |
labelHeight |
Default value is 20. Not used if layout is |
layout |
|
gap |
A Point. By default, the view tries to get its parent's |
margin |
A Point. This will inset the bounds occupied by the subviews of view. |
stringBackground |
An instance of Color. The |
stringColor |
An instance of Color. The |
menuBackground |
An instance of Color. The |
menuStringColor |
An instance of Color. The |
background |
An instance of Color. The |