mirror of
https://github.com/wxWidgets/Phoenix.git
synced 2026-01-05 11:30:06 +01:00
Switch from layout constraints to a sizer
This commit is contained in:
@@ -39,12 +39,11 @@ class ScrolledMessageDialog(wx.Dialog):
|
||||
|
||||
ok = wx.Button(self, wx.ID_OK, "OK")
|
||||
ok.SetDefault()
|
||||
lc = layoutf.Layoutf('t=t5#1;b=t5#2;l=l5#1;r=r5#1', (self,ok))
|
||||
text.SetConstraints(lc)
|
||||
|
||||
lc = layoutf.Layoutf('b=b5#1;x%w50#1;w!80;h*', (self,))
|
||||
ok.SetConstraints(lc)
|
||||
self.SetAutoLayout(1)
|
||||
sizer = wx.BoxSizer(wx.VERTICAL)
|
||||
sizer.Add(self.text, wx.SizerFlags(1).Border().Expand())
|
||||
sizer.Add(ok, wx.SizerFlags().Border().Center())
|
||||
self.SetSizer(sizer)
|
||||
self.Layout()
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user