[wxPython-users] Help drawing on a button
Christopher Barker
Chris.Barker at noaa.gov
Thu Jan 31 12:51:57 PST 2008
> I need to resolve my problems with the regular
> buttons first for the sake of my understanding of how wxPython
> works.
fair enough -- have you read these pages:
http://wiki.wxpython.org/?action=fullsearch&context=180&value=drawing&titlesearch=Titles
> Ok, I've implemented Cody's suggestion. It works, but is has another
> problem :). The button flickers all the time!
Not at all for me -- and it sure shouldn't -- you haven't really done
anything special -- you're just assigning a bitmap to a bitmap button,
the fact that you drew it in the __init__, rather than, say, loading it
from a file, should make no difference.
> It's worst when I move the mouse cursor over the button. At the risk of
> diverging, may I ask for your knowledgeable assistance
> once again? :)
What platform, version, etc are you using?
By the way if this is representative of what you want -- a bitmap button
where the bitmap is drawn by your code, this is a fine way to do it. You
will probably want the generic button is want to customize the behavior
of the button.
> First of all, here is the code, for the sake of whoever finds this
> thread asking the same questions
What platform, versions, etc are you running? As I said, this works just
fine on my OS-X python2.5, wxPython2.8.* system.
-Chris
--
Christopher Barker, Ph.D.
Oceanographer
Emergency Response Division
NOAA/NOS/OR&R (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception
Chris.Barker at noaa.gov
More information about the wxpython-users
mailing list