On Jan 16, 2006, at 8:44 AM, Don Taylor wrote:
In wxWindows I always place a panel as the first control in a frame
and then place other controls and sizers inside that panel.
As do I.
In the Designer you create a dbForm (is this pretty much the same
thing as a frame?)
The dForm class is a subclass of wx.Frame, so yes.
with a 1-slot vertical sizer already embedded.
Questions:
1) Do I forget my habit of creating top-level panels?
No. I have code in dForm.py to automatically add a main panel,
but it is not yet integrated into the Designer. I thought about it
early on, and put in on my ToDo list. I guess I should probably take
care of that soon.
2) If so, do I create any new sizers inside the pre-created sizer
and leave the pre-created sizer alone?
As the Designer exists now, you would have to add a dPanel to
the initial sizer. Then add a sizer to that panel, and proceed from
there.
3) Or can I re-define the pre-created sizer at will? (more slots,
change its nature to a different sizer).
Yes, you can do that; in fact, if you add, say, a 3-slot
horizontal sizer to the initial sizer, it replaces it, since the
initial sizer is useless at that point.
What I'd really like to do is add that form-level panel
automatically. This is an artifact of the wxWidgets design, and IMO
should not have to be done by the user. For example, if you set the
BackColor of the form, it should affect this 'main panel', too, since
a form (as it's a wx.Frame) cannot have a BackColor.
Can anyone think of a reason why this should not be done (at
least as a default behavior)? What I'm thinking of is that this panel
would be handled by the framework, so that the user never has to
think about it (at least when using the Designer). If you code by
hand, well, then you have to handle it yourself, but if you use the
Designer, the panel is added for you without even showing up in the
Designer or even the .cdxml file.
-- Ed Leafe
-- http://leafe.com
-- http://dabodev.com
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users