How Does One Get a Button to Show Clicked?

Do I need some trick to get a wx.Button to show it's clicked (i.e.,
depressed)? I have tried the demo Button.py from wxPython 2.8.11 and
it shows the desired behavior. The only significant difference
between my GUI set up and the demo I can see is that my button is a
child of a frame while the demo is a child of a panel.

I am using Python 2.6.5 and wxPython 2.8.11 on Ubuntu 10.04 (64-bit).

Suggestions?

Thanks.

-Tom

Thomas M. Browder, Jr.
Niceville, Florida
USA

are you using a wx.Button or a wx.BitmapButton?

I don’t think a wx.Button has the ability to change on selection or a click.

···

On Wed, Jul 28, 2010 at 12:59 PM, Tom Browder tom.browder@gmail.com wrote:

Do I need some trick to get a wx.Button to show it’s clicked (i.e.,

depressed)? I have tried the demo Button.py from wxPython 2.8.11 and

it shows the desired behavior. The only significant difference

between my GUI set up and the demo I can see is that my button is a

child of a frame while the demo is a child of a panel.

I am using Python 2.6.5 and wxPython 2.8.11 on Ubuntu 10.04 (64-bit).

Suggestions?

Thanks.

-Tom

Thomas M. Browder, Jr.

Niceville, Florida

USA

To unsubscribe, send email to wxPython-users+unsubscribe@googlegroups.com

or visit http://groups.google.com/group/wxPython-users?hl=en

The native buttons will respond to user clicks that way, but there isn't a way to do it programatically. Maybe you want to use wx.ToggleButton?

···

On 7/28/10 12:59 PM, Tom Browder wrote:

Do I need some trick to get a wx.Button to show it's clicked (i.e.,
depressed)? I have tried the demo Button.py from wxPython 2.8.11 and
it shows the desired behavior. The only significant difference
between my GUI set up and the demo I can see is that my button is a
child of a frame while the demo is a child of a panel.

--
Robin Dunn
Software Craftsman