mirror of
https://github.com/wxWidgets/Phoenix.git
synced 2025-07-21 12:41:10 +02:00
Do not specify invalid alignment in BoxSizer flags
Specyfing a horizontal alignment in a wxHORIZONTAL layed out BoxSizer is pointless, and doing so throws an exception: wx._core.wxAssertionError: C++ assertion "!(flags & wxALIGN_RIGHT)" failed at ./src/common/sizer.cpp(2133) in DoInsert(): Horizontal alignment flags are ignored in horizontal sizers
This commit is contained in:
@@ -56,7 +56,7 @@ class sizer_Tests(wtc.WidgetTestCase):
|
||||
def test_sizerFlags(self):
|
||||
bs = wx.BoxSizer()
|
||||
bs.Add(wx.Panel(self.frame),
|
||||
wx.SizerFlags(2).Border(wx.ALL, 5).Align(wx.ALIGN_RIGHT))
|
||||
wx.SizerFlags(2).Border(wx.ALL, 5).Align(wx.ALIGN_TOP))
|
||||
|
||||
def test_sizerAddMany(self):
|
||||
bs = wx.BoxSizer()
|
||||
|
@@ -219,7 +219,7 @@ class FMCustomizeDlg(wx.Dialog):
|
||||
hsizer = wx.BoxSizer(wx.HORIZONTAL)
|
||||
|
||||
# add a separator between the book & the buttons area
|
||||
hsizer.Add(wx.Button(self, wx.ID_OK, _("&Close")), 0, wx.EXPAND | wx.ALIGN_RIGHT)
|
||||
hsizer.Add(wx.Button(self, wx.ID_OK, _("&Close")), 0, wx.EXPAND)
|
||||
sz.Add(wx.StaticLine(self), 0, wx.EXPAND | wx.TOP | wx.BOTTOM, 3)
|
||||
sz.Add(hsizer, 0, wx.ALIGN_RIGHT | wx.ALL, 2)
|
||||
|
||||
|
Reference in New Issue
Block a user