|
Add a menu item.
Syntax 1
AddMenu(
parentPopupId,
"string",
text,
eventMsg
[,bChecked = FALSE]
[,enableState="enable"]
[,props]
)
Adds text (selection) as a menu item.
Parameters
parentPopupId
|
|
Type:
|
character
|
|
Parent PopupidIf you want to add to the first level, specify "root".
|
itemType
|
|
Type:
|
character
|
|
"string"
|
text
|
|
Type:
|
character
|
|
The text to display in the menu.
|
eventMsg
|
|
Type:
|
character
|
|
The string passed in the msg argument of the OnMenu event when the menu is selected.
For the following system menus, please specify the following strings in eventMsg.
File Menu
|
|
open
|
[file_open]
|
Open with URL
|
[file_open_url]
|
printing
|
[print]
|
Print Preview
|
[print_preview]
|
Print settings
|
[print_setup]
|
Screenshot(bmp)
|
[screenshot_bmp]
|
Screenshot(jpeg)
|
[screenshot_jpeg]
|
View Menu
|
|
Status Bar
|
[view_status_bar]
|
Zoom in
|
[zoom_in]
|
Cancel zoom in
|
[zoom_reset]
|
25%
|
[zoom_25]
|
50%
|
[zoom_50]
|
75%
|
[zoom_75]
|
100%
|
[zoom_100]
|
125%
|
[zoom_125]
|
150%
|
[zoom_150]
|
175%
|
[zoom_175]
|
200%
|
[zoom_200]
|
250%
|
[zoom_250]
|
300%
|
[zoom_300]
|
Shown in actual size
|
[stretch_none]
|
Stretch to fit
|
[stretch_full]
|
Stretch to fit size (maintain aspect ratio)
|
[stretch_holdrate]
|
Display full screen
|
[full_screen]
|
Operation Menu
|
|
Log in
|
[login]
|
Logout
|
[logout]
|
Debug Menu
|
|
Open the Debug dialog
|
[debug_dialog]
|
Enable Debugging
|
[debug_online]
|
Help Menu
|
|
Version Information
|
[about_application]
|
|
bChecked
|
|
Type:
|
Boolean
|
|
When TRUE, places a check mark next to the menu item.
|
EnableState
|
|
Type:
|
character
|
|
The state of the menu item.
"enable" - The menu item is displayed normally.
"disenable" - Disables the menu item so that it cannot be selected. It is not dimmed.
"gray" - Disables the menu item so that it cannot be selected and is dimmed.
|
Return Value
|
|
Type:
|
Boolean
|
|
FALSE - Failure. TRUE - Success.
|
Syntax 2
AddMenu(
parentPopupId,
"separator"
[,props]
)
Adds a separator as a menu item.
Parameters
parentPopupId
|
|
Type:
|
character
|
|
Parent PopupidIf you want to add to the first level, specify "root".
|
itemType
|
|
Type:
|
character
|
|
"separator"
|
Return Value
|
|
Type:
|
Boolean
|
|
FALSE - Failure. TRUE - Success.
|
Syntax 3
AddMenu(
parentPopupId,
"popup",
text,
popupId
[,props]
)
Adds a popup item as a menu item, which can contain child menu items.
Parameters
parentPopupId
|
|
Type:
|
character
|
|
Parent popup ID. If adding to the first level, specify "root".
|
itemType
|
|
Type:
|
character
|
|
"popup"
|
text
|
|
Type:
|
character
|
|
The text to display in the menu.
|
popupId
|
|
Type:
|
character
|
|
Popup ID. If you specify this popupId as the parentPopupId of AddMenu, you can add further child menu items.
|
Return Value
|
|
Type:
|
Boolean
|
|
FALSE - Failure. TRUE - Success.
|
Explanation
Add a menu item. A menu can have multiple levels. (There is no limit to the number of levels.) Parent popupidAdd a menu to (parentPopupId).
To add a first-level menu, use the parent popup.idSpecify "root" for (parentPopupId).
|
reference
InsertMenu
DelMenu
ClearMenu
SetMenuProperty
GetMenuProperty
SetClassProperty
SetIdProperty
GetIdProperty
|