ShowStyleDialog Command

Purpose

It opens a standard dialog box that is used to set up format of workspace objects.

Parameters of Use

Command parameters are passed in the Data property. Executing the command requires to specify the following value in the property:

Value type Description
IWxView Workspace display options, within which an object (objects) is selected and format setup dialog box is opened for it.

Application Features

The command can be used only for a workspace.

Example

Executing the example requires a form with the Button1 button on it, the WorkspaceBox component named WorkspaceBox1, and the UiWorkspaceObject component that is a data source for WorkspaceBox1. A workspace is connected to UiWorkspaceObject, the Active property is set to True. Add a link to the Ui system assembly.

Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
    Target: IUiCommandTarget;
    Context: IUiCommandExecutionContext;
Begin
    Target := WinApplication.Instance.GetPluginTarget("Wsp");
    Context := Target.CreateExecutionContext;
    Context.Data := WorkspaceBox1.View;
    Target.Execute("ShowStyleDialog", Context);
End Sub Button1OnClick;

Selecting a workspace object (objects) and clicking the button opens the dialog box that is used to set up object format.

See also:

IUiCommandTarget.Execute