[wxPython-users] Adding "Standard" Buttons
Mark Erbaugh
mark at microenh.com
Wed Feb 13 11:05:16 PST 2008
On Wed, 2008-02-13 at 12:49 -0600, Mark Guagenti wrote:
> wx.Panel has CreateStdDialogButtonSizer which can be used like:
> panel.CreateStdDialogButtonSizer(wx.OK | wx.CANCEL)
>
> http://www.wxpython.org/docs/api/wx.Dialog-class.html
>
> On 2/13/08, Mark Erbaugh <mark at microenh.com> wrote:
> > 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.
That's not what I want to do. I have a function that should be callable
from multiple frames within my application, but for which none of the
standard buttons are appropriate.
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.
Mark
More information about the wxpython-users
mailing list