Re: Changing state of buttons.

From: Jamey Saunders (jsaunders_at_internetbusinesslinks.net)
Date: 09/10/04


Date: 10 Sep 2004 05:30:21 -0700

Brian Szmyd <szmyd@colostate.edu> wrote in message news:<dLOdnVo1apKSg9zcRVn-hg@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