Method XbpMenu():new() Foundation

Creates an instance of the XbpMenu class.

Syntax
XbpMenu():new( [<oParent>], ;
               [<aPresParam>], ;
               [<lVisible>] ) --> oXbpMenu
Parameters
<oParent>
The parent for the XbpMenu object can be optionally specified using the parameter <oParent>. By default <oParent> is the active window (the return value of SetAppWindow()). When an XbpMenu object is part of a menu system, the parent should be an XbpMenuBar object or another XbpMenu object.
<aPresParam>
A two dimensional array can be specified for <aPresParam>. Refer to Generic presentation parametersfor a detailed explanation.
Under Windows, it is not possible to override the settings of the system control panel for menus.
Under OS/2, the following presentation parameters are recognized for menus:
#define constants for presentation parameters
Constant Valid values
XBP_PP_MENU_FGCLR XBPSYSCLR_* and GRA_CLR_*
XBP_PP_MENU_BGCLR XBPSYSCLR_* and GRA_CLR_*
XBP_PP_MENU_HILITE_FGCLR XBPSYSCLR_* and GRA_CLR_*
XBP_PP_MENU_HILITE_BGCLR XBPSYSCLR_* and GRA_CLR_*
XBP_PP_MENU_DISABLED_FGCLR XBPSYSCLR_* and GRA_CLR_*
XBP_PP_MENU_DISABLED_BGCLR XBPSYSCLR_* and GRA_CLR_*
<lVisible>
The parameter <lVisible> determines whether an XbpMenu object is visible immediately after the call to the method :create(). By default <lVisible> is .F. (false) and the XbpMenu object is not displayed after :create() is executed. This default behavior can be suppressed by specifying the value .T. (true) for the parameter <lVisible> . In this case, the XbpMenu object is displayed immediately and the menu construction using :addItem() can be visually observed.
Return

The class method :new() returns an XbpMenu object.

Feedback

If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.