The script shows how to change the cursor of a program. The shape of the cursor outside the main window of the program remains unchanged.
- Define a combo box of text.
- Store a list of cursor names in the combo box.
- Change the cursor to pointer (the shape of a pointing finger) when the main window is shown.
- When a cursor name is selected from the combo box, change the cursor of the program according to the name.
- When the program is quit, the shape of the cursor will reset to default.
Source Code
Reference:
- https://developer.gnome.org/gdk3/stable/gdk3-Cursors.html
- https://blog.gtk.org/2016/05/18/cursors-in-gtk/
No comments:
Post a Comment