IWorkspaceBox.DefaultMenu

Fore Syntax

DefaultMenu: Boolean;

Fore.NET 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.

Fore 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.

Fore.NET Example

Executing the example requires a .NET form that contains the button component with the button1 identifier and the WorkspaceBoxNet component with the WorkspaceBoxNet1 identifier. Specify a data source for the WorkspaceBoxNet1 component. The example is a handler of the Click event for the button1 component.

Private Sub button1_Click(sender: System.Object; e: System.EventArgs);
Begin
    WorkspaceBoxNet1.DefaultHandlers := True;
    WorkspaceBoxNet1.DefaultMenu := True;
End Sub;

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