More newbie sizer questions

Problem solved. Got the text box to move to the right of the dialog
box by adding a third column containing some extra space eg

datSizer.Add(d1Label, 0,
wx.ALIGN_CENTER_VERTICAL)

datSizer.Add((20,10), 1)

datSizer.Add(d1Text)

BTW I tried doing the same thing with AddStretchSpacer (a method
of wxSizer). wxFlexGridSizer is derived from wxSizer so why did
Python give the error message

‘FlexGridSizer’ object has no attribute ‘AddStretchSpacer’?

The border problem by caused by having the wrong argument list to the Add
method ie

dlgSizer.Add(datSizer, wx.ALL, border=10)

should have been

dlgSizer.Add(datSizer, 0, wx.ALL, border=10)

Now everything is fine … for the moment!

Alun Griffiths wrote:

BTW I tried doing the same thing with AddStretchSpacer (a method of wxSizer). wxFlexGridSizer is derived from wxSizer so why did Python give the error message

'FlexGridSizer' object has no attribute 'AddStretchSpacer'?

AddSpacer and AddStretchSpacer were not added to wxPython for a while because of a conflict with an old deprecated Python-only method name. They have been added in 2.7 though.

···

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!