From: Ed L. <ed...@le...> - 2006-04-22 15:15:14
|
On Apr 22, 2006, at 10:31 AM, Alex Tweedly wrote: > I think that you can achieve the kind of layout / resizing you want > (including x-platform) with the sizers in wxWidgets - BoxSizers and > FlexGridSizer get you most of the way, adding GridBagSizer gets you > everything else (hopefully once I understand them better, I'll be > sure that FlexGridSizer is unnecessary, and that BoxSizers + > GridBagSizer is enough). Agreed. After playing around with all the various sizer options in wxPython, we settled on just that combination: dSizer is based on the wx.BoxSizer, and dGridSizer is based on wx.GridBagSizer. That seems to cover any layout situation I've come across. > I've been looking, on and off, for a while at adding sizers to the > layout editor. So, triggered by your first email on this topic, > I've started writing up how I think this could be (simply) done - > I'll get that (first draft) out this weekend, and if you're up for > it we can perhaps collaborate on it. If it saves you some effort, I went through the same effort with the Dabo Class Designer. I started with a PythonCard-like approach, with objects that used absolute positioning, and then tried to add sizers into that mix. It was impossible to visually represent that mix of sizer and non-sizer layouts together. The only approach that seemed to be feasible was to go with the sizers-only design, in which you create the sizers and allocate 'slots' that then get filled with controls. I have a couple of screencasts that show this approach in action, and also try to educate people who are new to sizers how to approach laying out a form; perhaps they might be helpful to your ideas on adding sizers to PythonCard. http://leafe.com/screencasts/sizers1.html http://leafe.com/screencasts/sizers2.html -- Ed Leafe -- http://leafe.com -- http://dabodev.com |