If I want to add a third button, the third button is placed top left of
the window. Is it not supported to add a third or forth button to that
sizer?
Hi,
If I want to add a third button, the third button is placed top left of
the window. Is it not supported to add a third or forth button to that
sizer?
Works fine for me, how are you creating your buttons and using the sizer?
"""
class MyDialog(wx.Dialog):
def __init__(self, parent):
super(MyDialog, self).__init__(parent)
sizer = wx.BoxSizer(wx.VERTICAL)
tctrl = wx.TextCtrl(self, style=wx.TE_MULTILINE)
sizer.Add(tctrl, 1, wx.EXPAND)
btnsizer = self.CreateButtonSizer(wx.YES|wx.NO|wx.CANCEL)
sizer.Add(btnsizer, 0, wx.EXPAND)
self.SetSizer(sizer)
"""
Cody
···
On Wed, Aug 4, 2010 at 5:12 PM, FranzSt <franz.steinhaeusler@gmx.at> wrote:
Cody Precord wrote:
Hi,
If I want to add a third button, the third button is placed top left of
the window. Is it not supported to add a third or forth button to that
sizer?Works fine for me, how are you creating your buttons and using the sizer?
"""
class MyDialog(wx.Dialog):
def __init__(self, parent):
super(MyDialog, self).__init__(parent)sizer = wx.BoxSizer(wx.VERTICAL)
tctrl = wx.TextCtrl(self, style=wx.TE_MULTILINE)
sizer.Add(tctrl, 1, wx.EXPAND)btnsizer = self.CreateButtonSizer(wx.YES|wx.NO|wx.CANCEL)
sizer.Add(btnsizer, 0, wx.EXPAND)
self.SetSizer(sizer)
"""Cody
I have looked a little bit at the source and it seems, only certain
buttons are accepted. Maybe therefore the part "Std" in the name.
btnCancel = wx.Button(self, wx.ID_CANCEL, "&Cancel")
btnEdit = wx.Button(self, wx.ID_EDIT, "&Edit")
btnOk = wx.Button(self, wx.ID_OK, "&Ok")
btn_sizer = wx.StdDialogButtonSizer()
btn_sizer.AddButton(btnEdit)
btn_sizer.AddButton(btnCancel)
btn_sizer.AddButton(btnOk)
btn_sizer.Realize()
···
On Wed, Aug 4, 2010 at 5:12 PM, FranzSt <franz.steinhaeusler@gmx.at> wrote: