Command ObjectProperties

Purpose

It opens a standard dialog box that is used to set up object or sheet objects properties.

Parameters of Use

Command parameters are passed in the Data property. To ensure command execution, determine one of the following values in this property:

Value type Description
ITabObject The sheet object, for which the parameter setup dialog box is to be displayed.
Array The array of the Variant type. Each array element is a sheet object described by the ITabObject interface. If the type of array element is not ITabObject, the element is ignored.

Application Features

The command is used only for regular reports. Executing the command shows logical True if the OK button is clicked in the dialog box, and False if the Cancel button is clicked.

Example

Executing the example requires a form, the Button1 button on this form, the ReportBox component and the UiReport component named UiReport1, which is used as the data source for the ReportBox component. The active sheet of the regular report linked to the UiReport1 component contains at least one object.

Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
    Report: IPrxReport;
    Sheet: ITabSheet;
    Target: IUiCommandTarget;
    Context: IUiCommandExecutionContext;
Begin
    Report := UiReport1.Instance As IPrxReport;
    Sheet := (Report.ActiveSheet As IPrxTable).TabSheet;
    Target := WinApplication.Instance.GetPluginTarget("Report");
    Context := Target.CreateExecutionContext;
    Context.Data := Sheet.Objects.Item(0);
    Target.Execute("ObjectProperties", Context);
End Sub Button1OnClick;

Clicking the button opens a dialog box for setting up parameters of the first object located on the active report sheet.

See also:

IUiCommandTarget.Execute