[Tkinter-discuss] busy mouse cursor for application

Vasilis Vlachoudis Vasilis.Vlachoudis at cern.ch
Thu Nov 28 10:18:27 EST 2019


Many thanks!
I was just about to implement the pointer from Roberto G. to https://effbot.org/zone/tkinter-busy.htm
but apparently a call to the tk busy is far easier
I am just doing on the toplevel window
def busy(self):
   self.tk.call("tk","busy","hold",self)
def notbusy(self):
   self.tk.call("tk","busy","forget",self)
and works beautifully!

Vasilis

________________________________________
From: Tkinter-discuss [tkinter-discuss-bounces+vasilis.vlachoudis=cern.ch at python.org] on behalf of E [emilianogavilan at gmail.com]
Sent: Thursday, November 28, 2019 15:55
To: tkinter-discuss at python.org
Subject: Re: [Tkinter-discuss] busy mouse cursor for application

El 28/11/2019 a las 09:59 a. m., Vasilis Vlachoudis escribió:
> Hi all,
>
> how can I display the cursor as the watch for the whole application.
> When I set it on the toplevel window as
> self.toplevel.config(cursor="watch")
> it displays the cursor almost everywhere (I believe where the cursor is "")
> except for the widgets like Entry, Text that have the cursor="xterm" or anything
> that has a custom cursor.
>
> Is there a way to set the "watch" for everything and restore it later on

Tk provides the command "tk busy" [1] which does what you want, but as
far as I can see tkinter still doesn't ship it wrapped [2]. You can
steal ideas from the links below. Also note this text in the manual page:
"""
PORTABILITY
Note that the tk busy command does not currently have any effect on OSX
when Tk is built using Aqua support.
"""

[1] https://www.tcl-lang.org/man/tcl8.6/TkCmd/busy.htm
[2] https://bugs.python.org/issue28498


Regards
Emiliano
_______________________________________________
Tkinter-discuss mailing list
Tkinter-discuss at python.org
https://mail.python.org/mailman/listinfo/tkinter-discuss


More information about the Tkinter-discuss mailing list