TopBarMenu() > Menu display and selection |
|
|
oTopBarMenu:modal()
Activates the menu.
Syntax
:modal( <nStartItem>, ;
[<nMsgRow>] , ;
[<nMsgLeft>] , ;
[<nMsgRight>], ;
[<cMsgColor>], ;
[<GetList>] ) --> nMenuItemID
Arguments
- <nStartItem>
- This is a numeric value indicating the ordinal position of the first menu item
to be selected when the menu is activated.
- <nMsgRow>
- This is a numeric value specifying the screen row for displaying messages assigned to
the instance variable :message of menu items.
The range for <MsgnRow> is between 0 and MaxRow().
- <nMsgLeft>
- This is a numeric value specifying the left screen coordinate for displaying menu messages.
Usually, <nMsgLeft> is set to the value 0.
- <nMsgRight>
- This is a numeric value specifying the right screen coordinate for displaying menu messages.
Usually, <nMsgRight> is set to the value of MaxCol().
- <cMsgColor>
- The parameter <cMsgColor> is an optional character string defining the color for
the message to display. It defaults to SetColor().
- <GetList>
- Optionally, a GetList array can be passed when the menu is activated during READ.
Description
Method :modal() activates the top bar menu and processes user input with the cursor keys.
To react to mouse events, SET EVENTMASK must be set accordingly. When the user
selects a menu item, the corresponding :data code block is
evaluated, if present. The method returns the ordinal position of the selected menu item.
If the user cancels menu selection with the Esc key, the return value is zero.
Copyright © 2006-2007 xHarbour.com Inc. All rights reserved.
http://www.xHarbour.com
Created by docmaker.exe