InteractiveRestrictions: TabObjectInteractiveRestrictions;
InteractiveRestrictions: Prognoz.Platform.Interop.Tab.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.
The requirements and result of the Fore.NET Example execution match with those in the Fore Example.
Imports Prognoz.Platform.Interop.Drawing;
Imports Prognoz.Platform.Interop.Report;
Imports Prognoz.Platform.Interop.Tab;
…
Public Shared Sub Main(Params: StartParams);
Var
mb: IMetabase;
Report: IPrxReport;
Sheet: IPrxTable;
TObj: ITabObjects;
Placement: GxRectF;
Object: ITabObject;
Size:GxSizeF;
Begin
// Get current repository
mb := Params.Metabase;
// 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 GxRectFClass.Create();
Placement.Create(10,10,10,10);
Object := TObj.Add("PrxShape", Placement);
Size:=New GxSizeFClass.Create();
Size.Create(50,50);
Object.Size:=Size;
// Deny moving this object vertically and deny resizing object
Object.InteractiveRestrictions := TabObjectInteractiveRestrictions.toirMoveVertical Or
TabObjectInteractiveRestrictions.toirResizeBottom;
// Save dimensions
(Report As IMetabaseObject).Save();
End Sub;
See also: