June 2018
Beginner
508 pages
13h 8m
English
Finally, let's see the alerting logic. It's extremely simple:
def _sb(msg): _status_msg.set(msg)def _alert(msg): messagebox.showinfo(message=msg)
That's it! To change the status bar message all we need to do is to access _status_msg StringVar, as it's tied to the _status label.
On the other hand, if we want to show the user a more visible message, we can fire up a message box. Here's how it should look on a mac:

The messagebox object can also be used to warn the user (messagebox.showwarning) or to signal an error (messagebox.showerror). But it can also be used to provide dialogs that ask us whether we're sure we want to proceed ...
Read now
Unlock full access