Data: Variant;
The Data property determines the data required to execute a command.
Object instances, file links, parameter arrays and others can be passed as a property value. The list of parameters for various commands is given in examples for the Execute method.
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 the WorkspaceBox1 component.
Add links to the Forms, UI, and Workspace system assemblies.
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 and clicking the button opens the dialog box to set up format of the selected object.
See also: