[wxPython] Toggle and Bitmap Buttons

How to create a BitmapButton that can be toggled?
I know this topic has been around, but I haven't been able to find a
satisfactory solution (other than messing with inverting bitmaps manually,
which seems ugly) on the mailing list archive.

Before I go to lengths writing my own Button subclass in C++, is there an
elegant way in Python?
I read a previous post
(http://lists.wxwindows.org/pipermail/wx-users/2001-January/007147.html)
from Robin where example code is mentioned but the sourceforge link seems
invalid.

cheers,
Mike

See wxGenBitmapButton in wxPython/lib... the methods of interest will
[probably!] be SetBitmapDisabled
SetBitmapFocus
SetBitmapSelected

Cheerio, Chris

···

-------------------------------------------------------------------------
Chris Fama <mailto:Chris.Fama@whollysnakes.com>
         or <mailto:Chris.Fama@uq.net.au>
Brisbane, Australia
Phone: (0/+61)(7) 3870 5639 {10am-10pm GMT+10 on both these numbers please}
Mobile: (0/+61)(400) 833 700
-------------------------------------------------------------------------
Business page: <http://whollysnakes.com>
Personal page: <http://uq.net.au/~zzcfama&gt;
-------------------------------------------------------------------------

----- Original Message -----
From: "Bleyer, Michael" <MBleyer@DEFiNiENS.com>
To: <wxpython-users@lists.wxwindows.org>
Sent: Monday, August 06, 2001 9:48 PM
Subject: [wxPython] Toggle and Bitmap Buttons

How to create a BitmapButton that can be toggled?
I know this topic has been around, but I haven't been able to find a
satisfactory solution (other than messing with inverting bitmaps manually,
which seems ugly) on the mailing list archive.

Before I go to lengths writing my own Button subclass in C++, is there an
elegant way in Python?
I read a previous post
(http://lists.wxwindows.org/pipermail/wx-users/2001-January/007147.html)
from Robin where example code is mentioned but the sourceforge link seems
invalid.

cheers,
Mike

_______________________________________________
wxpython-users mailing list
wxpython-users@lists.wxwindows.org
http://lists.wxwindows.org/mailman/listinfo/wxpython-users

How to create a BitmapButton that can be toggled?
I know this topic has been around, but I haven't been able to find a
satisfactory solution (other than messing with inverting bitmaps manually,
which seems ugly) on the mailing list archive.

Before I go to lengths writing my own Button subclass in C++, is there an
elegant way in Python?
I read a previous post
(http://lists.wxwindows.org/pipermail/wx-users/2001-January/007147.html)
from Robin where example code is mentioned but the sourceforge link seems
invalid.

The new link is

http://cvs.wxwindows.org/cgi-bin/viewcvs.cgi/wxPython/wxPython/lib/buttons.p
y?rev=1.5&content-type=text/vnd.viewcvs-markup

and it's actually a module you already have in your wxPython install. The
class you want is wxGenBitmapToggleButton. See the demo for an example.

···

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