IWxShape.Cursor

Syntax

Cursor: WxCursor;

Description

The Cursor property determines the appearance of cursor when over an object.

Example

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;

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:

IWxShape