DefaultMenu: Boolean;
DefaultMenu: boolean;
The DefaultMenu property determines whether workspace and shapes placed on it have the system context menu.
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 value is False, the context menu is not present, or the menu is available, which is set for the component in the PopupMenu property.
By default this property is set to False.
NOTE. If value is set for the PopupMenu property, the system menu is not available to use.
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. Example is the OnClick event handler 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 defined for the shapes in the repository workspace are performed on them.
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. 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 defined for the shapes in the repository workspace are performed on them.
See also: