Changing state of buttons.

Jamey Saunders jsaunders at internetbusinesslinks.net
Fri Sep 10 08:30:21 EDT 2004


Brian Szmyd <szmyd at colostate.edu> wrote in message news:<dLOdnVo1apKSg9zcRVn-hg at comcast.com>...
> Hi Jamey,
> 
> First off, many people will agree when I say ditch Tkinter, and switch to
> wxPython. Never the less...
> 
> Not knowing a lot of Tkinter I would guess you can initialize these buttons
> to be in the "greyed out" state, and create an event on the two input
> fields that checks for any data input. Make the event call some validation
> function if you need it, and change the state of the button to "non-greyed
> out" if all is well!
> 
> -regards
> brian szmyd

Hi Brian,

Thanks for the recommendation on wxPython.  I'll check it out.  It's
not like I've lost a ton of time learning Tkinter.  That does bring up
the question of why is wxPython better than Tkinter, though.

The basic idea you recommend is exactly what I want to do, but the
problem I'm having is actually changing the buttons' state.  I have
them initialized to inactive, and I'm checking the input fields for
data.  My problem is that I don't know (and can't find an example
anywhere) how to change the state of a button that has already been
packed.

I'll check out wxPython, though.  It may be that I'm just using the
wrong GUI extensions...

Thanks again,

Jamey Saunders



More information about the Python-list mailing list