Tkinter: Missing the last piece of the puzzle

Simon Forman sajmikins at gmail.com
Sun Feb 24 04:45:14 CET 2008


On Feb 23, 9:00 am, MartinRineh... at gmail.com wrote:
> I have a simple editor built into my visual parser. It has a File menu
> with
> typical New, Open, Save, Save As ... options. I now know how to set
> the options [en/dis]abled and how to check the Text widget's modified
> flag.
>
> Now I want to [en/dis]able those options. Can I ask the text to notify
> me when the modified flag changes?

yes! check out http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/464635

HTH,
~Simon

> Can I set the statuses when the
> user clicks File, before the options are displayed? Do I need to
> create
> a checker on an independent thread that looks at the flag every few
> millis?
>
> (Tkinter deserves more respect. I've got a good-looking application
> growing quickly.)





More information about the Python-list mailing list