Hi all
There may not be an answer to this, but I am hoping that Robin will come up
with one of his inspired solutions
I have a wx.Frame with a panel with various controls, and the panel has a
sizer. One of the controls is a wx.Notebook, where each page contains a
panel with various controls, and each panel has its own sizer. After adding
all the controls I call self.frame.SetClientSize(self.panel.GetBestSize()).
The Notebook is sized according to the size of its largest page, and it all
works fine.
I now have a situation where the Notebook has, say, 5 pages, none of which
are particularly wide, so the overall width given to the Notebook is quite
small. This results in there not being enough width to show all the tabs, so
a 'tab scroll bar' appears. There is plenty of space to show all the tabs,
so I want to tell it to make the Notebook wider.
I can call SetSizeHints(500,-1) on the Notebook, and it correctly sets the
width to 500, with all tabs visible. The question is, how can I get the size
of the tabs so that I can calculate the desired width? I can call
GetTextExtent() on each GetPageText(), but this ignores the padding. There
is a SetPadding() method, but no GetPadding().
Does anyone have any suggestions?
Thanks
Frank Millman