Python/Tkinter: Using custom mouse cursors under Windows?

前端 未结 1 937
逝去的感伤
逝去的感伤 2021-01-06 16:52

Python 2.7/Windows: My understanding is that we can load custom mouse cursors using the cursor=\'@file.cur\' syntax:

widget = tkinter.Label( ..., cursor=\'@h         


        
1条回答
  •  独厮守ぢ
    2021-01-06 17:31

    lbl=Label(root, text="toto", cursor="@toto.cur") works for me on Python 2.6 and Vista. Make sure that the cur file is in the working directory of your script (I have a similar traceback if I try to load a non-existing cursor) and that the file is not corrupted.

    As an alternative, here is a list of internal cursors: http://www.tcl.tk/man/tcl8.4/TkCmd/cursors.htm

    0 讨论(0)
提交回复
热议问题