IWorkspaceBox.DefaultMenu

Syntax

DefaultMenu: Boolean;

Description

The DefaultMenu property determines whether workspace and shapes placed on it have the system context menu.

Comments

The property is available to use if the DefaultHandlers property is set to True.

If the DefaultMenu property is set to True, the system context menu implemented in the repository workspace is available. If the property is set to False, the context menu is not present, or the menu is available, which is set for the component in the PopupMenu property.

The property is set to False by default.

NOTE. If value is set for the PopupMenu property, the system menu is not available to use.

Example

Executing the example requires a form that contains the Button component with the Button identifier and the WorkspaceBox component with the WorkspaceBox1 identifier. Specify a data source for the WorkspaceBox1 component. The example is a handler of the OnClick event for the Button1 component.

Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Begin
    WorkspaceBox1.DefaultHandlers := True;
    WorkspaceBox1.DefaultMenu := True;
End Sub Button1OnClick;

On clicking the button the system context menu is available for the workspace and its shapes. Also, the actions determined for the shapes in the repository workspace are executed with them.

See also:

IWorkspaceBox