User Tools

Site Tools

Navigation:  Language Reference > 8 - Controls > Control Declarations > ====== MENU (declare a menu box) ====== Previous pageReturn to chapter overviewNext page


MENU(text) [,AT( ) ] [,USE( )] [,KEY( )] [,MSG( )] [,HLP( )] [,STD( )] [,RIGHT] [,DISABLE] [,COLOR] [LEFT( )] [,HIDE]
[,ICON( )] [,FONT( )] [, FIRST ]


MENU Declares a menu box within a MENUBAR.
text A string constant containing the display text for the menu selection (PROP:Text).
AT Specifies the width and height of the menu box (PROP:AT). If omitted, default values are selected by the runtime library. The first two parameters of the AT attribute are ignored. The fixed width specified by the AT attribute includes (and therefore must be greater than) the text offset specified by the LEFT attribute. The specified width of the area to draw the menu box can be less than the width of the default area provided by Windows, and the runtime library uses the full width of the specified area.
USE A field equate label to reference the menu selection in executable code(PROP:USE).
KEY Specifies an integer constant or keycode equate that immediately opens the menu (PROP:KEY).
MSG Specifies a string constant containing the text to display in the status bar when the menu is pulled down (PROP:MSG).
HLP Specifies a string constant containing the help system identifier for the menu (PROP:HLP).
STD Specifies an integer constant or equate that identifies a “Windows standard behavior” for the menu (PROP:STD).
RIGHT Specifies the MENU appears at the far right of the action bar (PROP:RIGHT).
DISABLE Specifies the menu appears dimmed when the WINDOW or APPLICATION is first opened (PROP:DISABLE).
COLOR Specifies the background, foreground, and selected color for the menu control .(see.COLOR)
LEFT Specifies the offset in dialog units from the left edge of the menu structure.
HIDE Specifies the MENU does not appear when the WINDOW or APPLICATION is first opened (PROP:HIDE). UNHIDE must be used to display it.
ICON Specifies an image file or standard icon to display on the menu (PROP:ICON).
FONT Specifies the display font for the control (PROP:FONT).
FIRST Specifies the MENU appears at the left or top of the menu when merged (PROP:FIRST).
LAST Specifies the MENU appears at the right or bottom of the menu when merged (PROP:LAST).

MENU declares a drop-down or cascading menu box structure within a MENUBAR structure. When the MENU is selected, the MENU and/or ITEM statements within the structure are displayed in a menu box. A menu box usually appears (drops down) immediately below its text on the menu bar (or above, if there is no room below). When selected with ENTER or RIGHT ARROW, any subsequent menu drop-box appears (cascades) immediately to the right of the MENU text in the preceding menu box (or left, if there is no room to the right). LEFT ARROW backs up to the preceding menu. The KEY attribute designates a separate accelerator key for the field. This may be any valid Clarion keycode to immediately pull down the MENU.

The text string may contain an ampersand ( & ) which designates the following character as the accelerator “hot” key which is automatically underlined. If the MENU is on the menu bar, pressing the Alt key together with the accelerator key highlights and displays the MENU. If the MENU is within another MENU, pressing the accelerator key, alone, highlights and executes the MENU. If there is no ampersand in the text, the first non-blank character in the text string is the accelerator key for the MENU, but it will not be underlined. To include an ampersand as part of the text, place two ampersands together (&&) in the text string and only one will display.


!An MDI application frame window with main menu for the application:
     MENU('Window'),STD(STD:WindowList),MSG('Arrange or Select Window'),LAST
      ITEM('Arrange Icons'),STD(STD:ArrangeIcons)
      ITEM('Search for Help On…'),USE(?HelpSearch),STD(STD:HelpSearch)
      ITEM('How to Use Help'),USE(?HelpOnHelp),STD(STD:HelpOnHelp)
      ITEM('About MyApp…'),USE(?HelpAbout)

See Also: Menubar Item

menu_declare_a_menu_box_.htm.txt · Last modified: 2021/04/15 14:30 by carlbarnes