ITabObjects.AlignSelected

Syntax

AlignSelected(Alignment: TabObjectsAlignment);

Parameters

Alignment. The parameter, defining the method of aligning of several objects.

Description

The AlignSelected method aligns groups of objects relative to visible sheet area.

Comments

To adjust the size of selected objects, use the ITabObjects.AdjustSelected method.

Example

Executing the example requires a regular report with the Regl_Rep identifier.

Add links to the Metabase, Report and Tab system assemblies.

Sub UserProc;
Var
    mb: IMetabase;
    Rep: IPrxReport;
    Sheet: IPrxTable;
    TObj: ITabObjects;
    i: Integer;
Begin
    mb := MetabaseClass.Active;
    Rep := MB.ItemById("Regl_Rep").Edit As IPrxReport;
    Sheet := Rep.Sheets.Item(0As IPrxTable;
    TObj := Sheet.TabSheet.Objects;
    For i := 0 To TObj.Count - 1 Do
        TObj.Item(i).Select_;
    End For;
    TObj.AlignSelected(TabObjectsAlignment.Left);
    (Rep As IMetabaseObject).Save;
End Sub UserProc;

After executing the example all objects on the set regular report sheet are selected. Next the objects are aligned to the left edge with respect to the leftmost object.

See also:

ITabObjects