Pointer Class | |
Create a mouse cursor, which is used to visually represent the mouse in a window.
Inheritance Hierarchy
Namespace:
VO
Assembly:
VOGUIClasses (in VOGUIClasses.dll) Version: 2.21
Syntax The Pointer type exposes the following members.
Constructors
| Name | Description |
---|
| Pointer |
Load a pointer from a resource entity.
|
TopProperties
| Name | Description |
---|
| Position |
A point representing the position of this pointer on the window, in screen coordinates.
|
TopMethods
| Name | Description |
---|
| Confine |
Confine the movement of this pointer to a given set of screen coordinates.
|
| Destroy | Free memory resources allocated for a VObject object and its derived objects. (Inherited from VObject.) |
| Handle |
Return the handle for a pointer.
|
| Hide |
Hide this pointer so it is not visible. Hide a control so it is not visible (until a subsequent call to Pointer:Show()).
|
| Show |
Display a pointer so it is visible.
|
TopFields Remarks
X# provides a set of predefined pointers, defined in Pointer:Init(). In addition, if desired, you can also create pointers from resource entities.
Each window can have its own pointer, and various pointer characteristics can be set, changed, or interrogated. As the pointer moves from the canvas area of one window to another, the GUI changes the pointer representation to that of the new window.
Tip: In X#, the class Pointer corresponds to a mouse cursor; use class Cursor to create text cursors.
Examples
The following example provides an application window with a custom cursor:
1CLASS MyTopAppWin INHERIT TopAppWindow
2METHOD Init CLASS MyTopAppWin
3SUPER:Init()
4SELF:Pointer := Pointer{IDC_APPCURSOR}
5RESOURCE IDC_APPCURSOR CURSOR app.cur
In Windows, pointers are sometimes called cursors. You can create a pointer in a resource entity.
See Also