AllowedInteractions: Integer;
AllowedInteractions: integer;
The AllowedInteractions property determines the actions that are available for a workspace shape.
One of the values (or a combination of values) from the elements of the WxAllowedInteractions enumeration must be defined as value of this property. When combination is selected, the elements are separated with the key word OR.
Executing the example requires a form with the Button1 button, the WorkspaceBox component named WorkspaceBox1 and a data source for it. The workspace displayed in the component contains at least one shape.
Add links to the Andy, Forms system assemblies.
Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
View: IWxView;
Shape: IWxShape;
Begin
View := WorkspaceBox1.View;
View.ActiveTool := WxTool.Pointer;
Shape := View.Workspace.Shapes.Item(0);
Shape.AllowedInteractions := WxAllowedInteractions.AllowSelection Or WxAllowedInteractions.VerticalSizing;
End Sub Button1OnClick;
Imports Prognoz.Platform.Forms.Net;
Imports Prognoz.Platform.Interop.Andy;
Private Sub button1_Click(sender: System.Object; e: System.EventArgs);
Var
View: IWxView;
Shape: IWxShape;
Begin
View := WorkspaceBoxNet1.View;
View.ActiveTool := WxTool.wtlPointer;
Shape := View.Workspace.Shapes.Item[0];
Shape.AllowedInteractions := Convert.ToInt32(WxAllowedInteractions.waiAllowSelection Or WxAllowedInteractions.waiVerticalSizing);
End Sub;
On clicking the button the indicator is enabled for the workspace as a working tool. This mode enables highlighting and activation of shapes, their resizing, and so on. The first shape is limited for available actions: the shape can be highlighted and resized in height.
See also: