Resizable Tabbed (wxNotebook) Dialog

Robert Amesz sheershion at mailexpire.com
Wed Aug 21 15:04:58 CEST 2002


Jose M. Balaguer wrote:

> Robert Amesz <sheershion at mailexpire.com> wrote in message
> news:<Xns926DB047588E5rcamesz at amesz.demon.nl>... 
>> Jose M. Balaguer wrote:
>> 
>>> This is an example of using a Tabbed (wxNotebook) Dialog with
>>> resizable controls. (It took me more than 2 days to realize I
>>> had to use wxPanel instead of wxWindows controls) 
>> 
>> Two days... That seems a bit long. Didn't you study the demo? 
>
> Regarding if a studied the demo... Yes I did it and I built my
> code upon it. And that was the main problem because the wxNotebook
> demo code (at least in wxPython 2.3.2.1 for MSW I have) uses a
> ColorPanel class which is based upon a wxWindow instead of a
> wxPanel... 

Ah, I see how that could have confused you. But that's not the part of 
the demo I meant: it was the _sizer_ demo I was referring to. The 
notebook control doesn't really care too much about what types of 
windows it manages, but when sizers are involved, wxPanels are clearly 
the best choice to put your widgets on. And when you don't use sizers, 
put your widgets on wxPanels anyway: that's what they're for.

Deriving classes from wxWindow directly is usually done when you want 
to paint stuff on it yourself, like custom controls. The colourpanels 
in the notebook demo are a trivial example of this. (More of a 
degenerate case, perhaps, as those just override the background 
colour.)


Robert Amesz



More information about the Python-list mailing list