Relief space inside agw.LabelBook

Just starting to use agw.LabelBook, looks terrific (thanks Andrea!).

Is there an easy way to get some relief space around the edge of the panels contained in the LB?

I AddPage(panel), the panel contains a sizer (GridBagSizer), then I put controls in the sizer. But the controls are scrunched right up against the tabs on the left. I'm trying to find a way to add some space there without adding yet another sizer layer or somesuch.

Ideas?

Thanks,
Michael

It's only a couple lines of code. For example to add a margin that is 10 pixels wide on all sides of your main content:

  borderSizer = wx.BoxSizer()
  borderSizer.Add(mainSizer, 1, wx.EXPAND|wx.ALL, 10)
  pageWindow.SetSizer(borderSizer)

And if you use the page window's Sizer property then it is even shorter:

  pageWindow.Sizer = wx.BoxSizer()
  pageWindow.Sizer.Add.Add(mainSizer, 1, wx.EXPAND|wx.ALL, 10)

···

On 11/3/11 9:05 AM, Michael Hipp wrote:

Just starting to use agw.LabelBook, looks terrific (thanks Andrea!).

Is there an easy way to get some relief space around the edge of the
panels contained in the LB?

I AddPage(panel), the panel contains a sizer (GridBagSizer), then I put
controls in the sizer. But the controls are scrunched right up against
the tabs on the left. I'm trying to find a way to add some space there
without adding yet another sizer layer or somesuch.

--
Robin Dunn
Software Craftsman

Thanks. I hadn't seen that pattern before. I think that extra '.Add' shouldn't be there.

I still worry about the extreme depths of panel-sizer-panel-sizer-etc. some of my stuff has reached. Reminds me of the Windows registry. (shudder)

Thanks,
Michael

···

On 11/3/2011 11:53 AM, Robin Dunn wrote:

And if you use the page window's Sizer property then it is even shorter:

pageWindow.Sizer = wx.BoxSizer()
pageWindow.Sizer.Add.Add(mainSizer, 1, wx.EXPAND|wx.ALL, 10)

There are some wrappers around wx that help alleviate some of this, like Dabo or WAX, but Dabo is the only one that’s still being worked on.

···

Mike Driscoll

Blog: http://blog.pythonlibrary.org

Correct. Copy/paste error.

···

On 11/3/11 10:41 AM, Michael Hipp wrote:

I think that extra '.Add'
shouldn't be there.

--
Robin Dunn
Software Craftsman