MenuCascade object

Menu objects contained within a MenuCascade object appear as a drop-down button palette.

Properties

MenuCascade property

Datatype

Description

Checked

Boolean

Specifies whether the Menu object is selected. The state of the checked property is reflected in the toolbar button. Values are:

TRUE -- Object is selected.

FALSE -- Object is not selected.

ClassDefinition

PowerObject

An object of type PowerObject containing information about the class definition of the object or control.

Columns

Integer

Specifies the number of columns in the drop-down button palette.

CurrentItem

Menu

Specifies the Menu object that is currently displayed on the main toolbar as the representative (active) button for the drop-down button palette.

Default

Boolean

Specifies whether the menu item is the default and appears in a bold typeface. Only one item within a menu should be set to default.

In context menus, the Default property is used to indicate the action that would have been performed if the user had double-clicked on the object rather than right-clicked on it.

The property is also used to indicate which operation would have been performed if the item had been dragged with the left mouse button rather than the right mouse button.

Values are:

TRUE -- Menu item is bolded.

FALSE -- Menu item is not bolded.

DropDown

Boolean

Specifies whether the Menu objects contained in the MenuCascade object display as a drop-down button palette. Values are:

TRUE -- Menu objects contained in the MenuCascade object are displayed as a drop-down button palette.

FALSE -- Menu objects contained in the MenuCascade object are displayed as normal toolbar items.

Enabled

Boolean

Specifies whether the Menu object is enabled (can be clicked). The state of the enabled property is reflected in the toolbar button. Values are:

TRUE -- Object is enabled.

FALSE -- Object is not enabled.

Item[ ]

Menu

Specifies the Menu objects under a Menu object.

MenuItemType

MenuItemType

(enumerated)

Allows you to identify special menu items that are used differently on different platforms. Values are:

MenuItemTypeAbout!

MenuItemTypeExit!

MenuItemTypeHelp!

MenuItemTypeNormal!

MergeOption

MenuMerge- Option (enumerated)

Specifies how the object is affected when an OLE 2.0 object is activated. Values are:

EditMenu!

Exclude!

FileMenu!

HelpMenu!

Merge!

WindowMenu!

For more information about MergeOption, see the section called “Using OLE in an Application” in Application Techniques.

MicroHelp

String

Specifies the text of the MicroHelp for the object.

ParentWindow

Window

Specifies the window that owns the Menu object.

ShiftToRight

Boolean

Specifies whether the Menu object shifts down or to the right when other Menu objects are added in a descendant menu. Values are:

TRUE -- Object shifts to right.

FALSE -- Object shifts down.

Shortcut

Integer

Specifies the shortcut key for the object. This property should be set only in the Menu painter. It cannot be set at runtime.

Tag

String

Specifies the tag value assigned to the Menu object.

Text

String

Specifies the text in the Menu object.

ToolbarItemDown

Boolean

Specifies how the toolbar button appears. Values are:

TRUE -- Toolbar button appears down.

FALSE -- Toolbar button appears up.

This property is automatically reset when any button is pressed using the mouse.

ToolbarItemDownName

String

Specifies the name of the toolbar icon associated with the Menu object when it is down.

ToolbarItemBarIndex

Integer

Specifies which toolbar the object is on when multiple toolbars exist. If setting this index results in the item being the first item on a new toolbar, the toolbar is implicitly created. If setting this index results in emptying a toolbar, the toolbar is implicitly destroyed.

ToolbarItemName

String

Specifies the name of a stock toolbar picture you want to use to represent an item in the toolbar or a string containing the name of a bitmap file.

ToolbarItemOrder

Integer

Specifies the order of the item in the toolbar.

ToolbarItemSpace

Integer

Specifies the amount of empty space before the item in the toolbar.

ToolbarItemText

String

Specifies the text that displays in the toolbar item when the display text option is on for toolbars.

ToolbarItemVisible

Boolean

Specifies whether the toolbar item displays. Values are:

TRUE -- Toolbar item is visible.

FALSE -- Toolbar item is not visible.

Visible

Boolean

Specifies whether the Menu object is visible. Values are:

TRUE -- Object is visible.

FALSE -- Object is not visible.


Events

MenuCascade event

Occurs

Clicked

When the Menu object is clicked (selected or unselected)

Help

When the user presses the F1 key or drags the context help button (question mark) from the title bar to a menu item or control

Selected

When the user moves to the Menu object using the arrow keys or the mouse


Functions

MenuCascade function

Datatype returned

Description

Check

Integer

Displays a check mark next to the Menu object and sets the Checked property

ClassName

String

Returns the class of the Menu object

Disable

Integer

Disables (and grays) the Menu object so that it cannot be selected and unsets the Enabled property

Enable

Integer

Enables the Menu object so that it can be selected, displays it normally (not grayed), and sets the Enabled property

GetContextService

Integer

Creates a reference to a context-specific instance of the specified service

GetParent

PowerObject

Returns a reference to the name of the parent object

Hide

Integer

Makes the Menu object invisible

PopMenu

Integer

Displays the Menu object at the specified location

PostEvent

Integer

Adds an event to the end of the message queue for the Menu object

Show

Integer

Makes the Menu object visible

TriggerEvent

Integer

Triggers a specified event in the Menu object and executes the script for the event

TypeOf

Object

Returns the type of the control

Uncheck

Integer

Removes the check mark next to the Menu object and sets the Checked property to FALSE