Toolbar AddCheckTool

I’m trying to use AddTool or AddCheckTool to do a depressed button - and I wanted to use a different image when the button is ‘on’.

I quickly discovered this doesn’t quite work - the AddTool ( , bmp1, bmp2, …) doesn’t actually use the bmp2 parameter.

So I have two questions I thought I’d throw out to the group:

  1. Has this changed in the most recent version?

  2. Presuming it hasn’t, I’m willing to spend some time coming up with a work around - if someone else already has, I’d love to hear about it…

I’m guessing I could use an event from the button to remove the button, insert a new one in its place, and “check” it.

Appreciate any feedback.

Walter E. Gough wrote:

I'm trying to use AddTool or AddCheckTool to do a depressed button - and I wanted to use a different image when the button is 'on'.

I quickly discovered this doesn't quite work - the AddTool ( , bmp1, bmp2, ...) doesn't actually use the bmp2 parameter.

So I have two questions I thought I'd throw out to the group:

1) Has this changed in the most recent version?

2) Presuming it hasn't, I'm willing to spend some time coming up with a work around - if someone else already has, I'd love to hear about it...

I'm guessing I could use an event from the button to remove the button, insert a new one in its place, and "check" it.

In the next release the toolbar will have a method that changes the bitmap on an existing tool.

···

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!