wx.Cursor

Inheritance diagram for wx.Cursor:



Description

A cursor is a small bitmap usually used for denoting where the mouse pointer is, with a picture that might indicate the interpretation of a mouse click. As with icons, cursors in X and MS Windows are created in a different manner. Therefore, separate cursors will be created for the different environments.

Platform-specific methods for creating a wx.Cursor object are catered for, and this is an occasion where conditional compilation will probably be required (see wx.Icon for an example).

A single cursor object may be used in many windows (any subwindow type). The wxWidgets convention is to set the cursor for a window, as in X, rather than to set it globally as in MS Windows, although a global wx.SetCursor is also available for MS Windows use.

Methods Summary

Class API

Methods

__init__(cursorName, type, hotSpotX=0, hotSpotY=0)

Construct a Cursor from a file. Specify the type of file using wx.BITMAP_TYPE* constants, and specify the hotspot if not using a .cur file.

Parameters:

  • cursorName (string)
  • type (long)
  • hotSpotX (int)
  • hotSpotY (int)

Returns:

wx.Cursor