views:

28

answers:

1

There are two buttons in my little program, start and stop. And what I want is to disable the start button after I click it, and when I hit the stop button it should return to normal. How can I do this? I googled for a while and couldn't find the answer, hope you guys can help me out. Thanks!

+1  A: 

Use the button's Enable and Disable methods in the appropriate event handlers. There's a sample available at the link below:

wxPython Button Demo

In this snippet we are playing around with wxPython's buttons, showing you how to bind the mouse click event, enable and disable, show and hide the buttons. Each button also has a tool-tip (hint) associated with itself.

ars
Thanks a lot. Should have give disable a try before asking...
Shane