Hi Robin,
Thanks for that. For the benefit of people finding this post in future, I have discovered that you can include other buttons by using the following approach (see ActiveState Community - Boosting coder and team productivity with ready-to-use open source languages and tools.):
Use AddButton() to add standard dialog buttons to the standard button sizer.
Then Realize().
Then (i.e. _after_ calling Realize) use Insert or Add to put additional buttons onto the sizer.
All the best, Grant
···
Message: 3 Date: Mon, 23 Mar 2009 12:14:28 -0700 From: Robin Dunn <robin@alldunn.com> Subject: Re: [wxpython-users] Autopositioning of buttons using StdDialogButtonSizer only works for some buttons To: wxpython-users@lists.wxwidgets.org Message-ID: <49C7DF94.7030002@alldunn.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Grant Paton-Simpson wrote:
> Hi,
> > It seems the autopositioning of buttons using StdDialogButtonSizer only > works for some buttons.
> > Reading the documentation > (wxPython API Documentation — wxPython Phoenix 4.2.2 documentation) ...
> > "A special sizer that knows how to order and position standard
> buttons in order to conform to the current platform's standards. You
> simply need to add each wx.Button to the sizer, and be sure to
> create the buttons using the standard ID's. Then call Realize and
> the sizer will take care of the rest."
>
What the docs don't say very clearly is that this is for buttons that would normally appear on standard dialogs, not necessarily for all buttons with a standard ID on any dialog. The IDs which will be managed by the sizer are:wx.ID_OK
wx.ID_YES
wx.ID_SAVE
wx.ID_APPLY
wx.ID_NO
wx.ID_CANCEL
wx.ID_HELP
wx.ID_CONTEXT_HELP-- Robin Dunn Software Craftsman http://wxPython.org Java give you jitters? Relax with wxPython!