BBjPopupMenu::insertCheckableMenuItemAt

Description

In BBj 14.0 and higher, this method returns a checkable menu item from a BBjPopupMenu.

SyntaxSyntax

Return Value

Method

BBjCheckableMenuItem

insertCheckableMenuItem(int index, int ID, string title)

BBjCheckableMenuItem

insertCheckableMenuItem(int index, int ID, string title, boolean checked)

Parameters

Variable

Description

index

Specifies the 0-based index at which to insert the checkable menu item.

ID

Specifies the ID of the checkable menu item to be added.

title

Specifies the title of the checkable menu item.

checked

Specifies whether the checkable menu item is initially checked.

Return Value

Returns the created BBjCheckableMenuItem object that was inserted into the menu.

Remarks

Each sub menu in the menu item with an index greater or equal to the specified index is shifted upward to have an index one greater than the value it had previously.

Example

rem ' insertCheckableMenuItem

sysgui = unt
open (sysgui)"X0"
sysgui! = bbjapi().getSysGui()
window! = sysgui!.addWindow(100,100,200,100,"",$00090003$)
window!.setCallback(window!.ON_CLOSE,"eoj")
menu! = window!.addPopupMenu()
menu!.addCheckableMenuItem(-103,"Initially Checked",1)
menu!.insertCheckableMenuItem(0,-102,"Initially Unchecked",0)
menu!.insertCheckableMenuItem(0,-101,"Checkable")
process_events

eoj:
release

See Also

BBjAPI

BBjSysGui

BBjControl

BBjWindow

BBjPopupMenu

See the BBj Object Diagram for an illustration of the relationship between BBj Objects.