InteractiveRestrictions: TabObjectInteractiveRestrictions;
The InteractiveRestrictions property determines move and resize modes that are not available for an object
By default the property is set to TabObjectInteractiveRestrictions.None, that is, there are not limitations for moving and resizing an object.
Executing the example requires that the repository contains a regular report with the TAB_REPORT identifier.
Add links to the Drawing, Metabase, Report, Tab system assemblies.
Sub UserProc;
Var
mb: IMetabase;
Report: IPrxReport;
Sheet: IPrxTable;
TObj: ITabObjects;
Placement: IGxRectF;
Object: ITabObject;
Size:IGxSizeF;
Begin
// Get current repository
mb := MetabaseClass.Active;
// Get regular report
Report := MB.ItemById("TAB_REPORT").Edit As IPrxReport;
// Get first report sheet
Sheet := Report.Sheets.Item(0) As IPrxTable;
// Remove all objects on the report sheet
TObj := Sheet.TabSheet.Objects;
TObj.Clear;
// Add a new autoshape
Placement:=New GxRectF.Create(10,10,10,10);
Object := TObj.Add("PrxShape", Placement);
Size:=New GxSizeF.Create(50,50);
Object.Size:=Size;
// Deny moving this object vertically and deny resizing object
Object.InteractiveRestrictions := TabObjectInteractiveRestrictions.MoveVertical Or
TabObjectInteractiveRestrictions.ResizeBottom;
// Save dimensions
(Report As IMetabaseObject).Save;
End Sub UserProc;
After executing the example an autoshape is added to the first report sheet, which is denied to move vertically and resize by moving the bottom border.
See also: