Adding "Standard" Buttons

Is it possible to add additional "Standard" buttons to an application?

These are the buttons with ID's like ID_OK, ID_CANCEL. I'd like to have
some additional standard buttons available throughout my application.

I could create a wx.Button descendants and use those, but I'm looking
for a way to create buttons with standard graphics and text just by
specifying the ID.

Thanks,
Mark

“answered”, darn it! Fat fingers! Fat fingers!

···

On Feb 13, 2008 10:56 AM, Marc Tompkins marc.tompkins@gmail.com wrote:

I couldn’t resist the deliciousness of a Mark being ansered by another Mark and then a Marc…


www.fsrtechnologies.com

Mark Erbaugh wrote:

I'd like to create some buttons with custom id's so I could add them to
all the appropriate screens with wx.Button(parent, id=MY_NEW_ID) The
text and bitmap on the button would be consistent across all frames.

Why use the ID mechanism? That's there as kind of a hack to get platform-dependent behavior. What's wrong with:

class MySpecialButton(wx.Button): (or maybe the GenButton in wx.lib)
  ....

then

MySpecialButton(parent)

etc, etc....

This is, indeed, exactly what subclassing is for!

-CHB

···

--
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@noaa.gov