Today I 'av mainly been thinking how to enable or disable a cursor in a Tkinter application. I looked at several threads on the internet but none exactly answered my question. This is what I did...
Use gimp to create a 1x1 pixel image.
Save as 1x1.xbm. You will have to export the file. Make sure the X10 box in unchecked and the hot spot box is checked.
The xbm file is readable and looks like:
$ cat 1x1.xbm
#define 1x1_width 1
#define 1x1_height 1
#define 1x1_x_hot 0
#define 1x1_y_hot 0
static unsigned char 1x1_bits[] = {
0x00 };
The code looks like...
from Tkinter import *
root = Tk()
root.configure(cursor='@1x1.xbm white') # turn cursor off
....
root.configure(cursor='arrow_left') # turn it back on
More elaborate options are possible that include a cursor a mask and 2 colors.
Sadly I was unable to make this work on OS X although I am sure it is possible.
On windows the cursor 'no' does the same thing.