Skip to content

tWebMenuItem

See Also: Integer, Declaring Variables, Struct

Purpose

tWebMenuItem is a structured type that is used to populate dynamic menu items in the cWebMenuBar, cWebMenuButton, and cWebToolBar classes.

Type Declaration

Struct tWebMenuItem
    String sId
    String sCaption
    String sTooltip
    String sGroupCaption
    Boolean bEnabled
    String sCSSClass
    String sHTMLId
    Boolean bBeginGroup
    String sImage
    Integer eCheckbox
    String sTextColor
    String sBackgroundColor
    Integer eActionDisplay
    tWebMenuItem[] aChildren
End_Struct

Struct Members

  • sId
    Unique identifier for the menu item.

  • sCaption
    Caption shown for this menu item.

  • sTooltip
    Tooltip shown for this menu item.

  • sGroupCaption
    Caption for the group shown when bBeginGroup is True and the menu style supports group captions.

  • bEnabled
    If False, the menu item is shown as disabled and cannot be clicked.

  • sCSSClass
    CSS class name applied to the menu item element used to apply custom styles.

  • sHTMLId
    HTML ID applied to the menu item element used for custom scripting.

  • bBeginGroup
    If True, this menu item visually starts a new group of menu items.

  • sImage
    URL to an icon image.

  • eCheckbox
    Used for the cWebMenuItemCheckbox class.

  • sTextColor
    CSS color for the text displayed.

  • sBackgroundColor
    CSS color for the background of the menu item.

  • eActionDisplay
    Mode used by the cWebActionBar class to determine how the item should be displayed.

Possible values are (the same as peActionDisplay in cWebMenuItem class):

  • adMenu: will only appear in the drop-down menu.
  • adActionBar: will only appear in the action bar.
  • adBoth (default): will appear in both the action bar and the menu.

  • aChildren
    Array of tWebMenuItem for child nodes.

Additional Information

See OnLoadChildNodes in the cWebTreeView class for information on struct members and how to use this data type.

Syntax

Use tWebMenuItem.pkg
:
tWebMenuItem {variableName}

Declaring Variables

To declare tWebMenuItem variables, use the name of the type (tWebMenuItem) followed by the variable name.

tWebMenuItem MyWebTreeItem

See struct variables for more details on instantiating struct types.