Cursor: WxCursor;
The Cursor property determines the appearance of cursor when over an object.
Executing the example requires a form with the Button and UiWorkspaceObject components with the Button1 and UiWorkspaceObject1 identifiers respectively. A corresponding repository object must be connected to UiWorkspaceObject.
Add links to the Andy, Metabase, Workspace system assemblies.
Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
Ws: IWxWorkspace;
Shape: IWxShape;
Begin
Ws := UiWorkspaceObject1.Instance As IWxWorkspace;
Ws.BeginUpdate;
Shape := Ws.Shapes.Item(0);
Shape.Cursor := WxCursor.Cross;
Ws.EndUpdate;
End Sub Button1OnClick;
Imports Prognoz.Platform.Interop.Andy;
Imports Prognoz.Platform.Interop.Workspace;
Private Sub button1_Click(sender: System.Object; e: System.EventArgs);
Var
Ws: IWxWorkspace;
Shape: IWxShape;
Begin
Ws := UiWorkspaceObjectNet1.WorkspaceObjectUi.Instance As IWxWorkspace;
Ws.BeginUpdate();
Shape := Ws.Shapes.Item[0];
Shape.Cursor := WxCursor.wcrCross;
Ws.EndUpdate();
End Sub;
After executing the example the mouse cursor looks as a cross on clicking the Button1 component over the defined shape of the UiWorkspaceObject1 component.
See also: