Layout questions

roee shlomo wrote:

Hi all,
I have a dialog with:
1. wx.gizmos.EditableListBox
2. wx.Panel that contains only a wx.Notebook
3. A close botton
Here are my problems: 1. wxMac specific: only the title of the EditableListBox is visible.

The EditableListBox doesn't give itself a meaningful best size, but you can override it by setting the minsize (the height component at least) yourself.

2. I want the dialog's width to fit all controls, including the size of the notebook tabs. Currently it only fits the listbox size and notebook *page* size. So not all tabs are visible (MSW: There's an arrow that allows viewing more tabs. Mac: some of the tabs are simply not visible).

Unfortunately the native notebook widget on mac is only designed to be used with a few items, so Apple didn't give it the ability to have hidden tabs, or to scroll, or whatever, when there is more than will fit in the available space. wx Also doesn't take them into account when calculating the best size. So again, you can work around this by setting the minsize (the width this time) to be large enough for all the tabs to be displayed, although you may also want to check the best size to make sure you don't set it too small. Also, you can make the tabs take less space on Mac by setting the window variant.

  self.book.SetWindowVariant(wx.WINDOW_VARIANT_SMALL)

···

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

Thanks Robin :slight_smile:

worked like a charm.

···

On 18/03/2008, Robin Dunn robin@alldunn.com wrote:

roee shlomo wrote:

Hi all,

I have a dialog with:

  1. wx.gizmos.EditableListBox
  1. wx.Panel that contains only a wx.Notebook
  2. A close botton

Here are my problems:

  1. wxMac specific: only the title of the EditableListBox is visible.

The EditableListBox doesn’t give itself a meaningful best size, but you

can override it by setting the minsize (the height component at least)
yourself.

  1. I want the dialog’s width to fit all controls, including the size
    of the notebook tabs. Currently it only fits the listbox size and

notebook page size. So not all tabs are visible (MSW: There’s an arrow
that allows viewing more tabs. Mac: some of the tabs are simply not
visible).

Unfortunately the native notebook widget on mac is only designed to be

used with a few items, so Apple didn’t give it the ability to have
hidden tabs, or to scroll, or whatever, when there is more than will fit
in the available space. wx Also doesn’t take them into account when

calculating the best size. So again, you can work around this by
setting the minsize (the width this time) to be large enough for all the
tabs to be displayed, although you may also want to check the best size
to make sure you don’t set it too small. Also, you can make the tabs

take less space on Mac by setting the window variant.

   self.book.SetWindowVariant(wx.WINDOW_VARIANT_SMALL)


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


To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org

For additional commands, e-mail: wxPython-users-help@lists.wxwidgets.org