Hi Don,
Kevin Ollivier wrote:
Take a look at Interface Builder (IB). It allows for sizer-like control (although perhaps it's a bit closer to layout constraints...), but in IB the 'sizers' are not something you need to create yourself - by default you can just drag and drop elements into a window. You can't do that with wxPython GUI builders when using sizers, because you need to give that window a sizer first before you can add the control.
Well, I've occasionally done it controls first with XRCed: add a bunch of controls, then: add a sizer, cut'n'paste a few controls into it, iterate as needed (XRCed has execellent support for cut'n'paste). I've mostly done that when I'm in "visual brainstorming" mode; if I have a clear idea of how it should look, I'll usually build it top-down. Dunno how that might go in other builders.
Come to think of it, a nice extension to XRCed might be the ability to select a group of controls/containers and say "wrap these in a sizer of this kind".
I think the reason is that, in other GUI builders, e.g. Interface Builder, Qt Designer, etc. layout and sizing are *properties* of the control, not something totally separate from the control.
Seems to me there's a potential problem with that approach: sizing is generally not an operation on an individual control, but on a set of them (possibly the whole frame). It could be awkward to try to specify a multi-control layout when you're restricted to operations on one control at a time. I might be missing something, though.
Multi-control layouts would be controlled by the parent control in the multi-control layout. e.g. you'd change the parent's layout from BoxSizer to GridSizer, and this would adjust all the child controls automatically.
what I care about is that manipulating sizers within GUI builders becomes easier to do so we can get closer to RAD GUI building.
I think we're probably all in sympathy with this. I think we're still in learning mode as a community on the best way (or ways) to do it.
when you're writing your wx app in your GUI builder, and a vertical box sizer doesn't cut it anymore, go into the parent's properties and change it to a grid sizer and watch the new layout appear in front of you. Don't like that? Adjust it's properties, or maybe try a flex grid sizer.
Hate to sound like a shill for XRCed, but it does that nicely with its Replace operation (which works on controls as well as sizers). I've used it to good effect.
It's not so much an issue of whether or not it can be done; it's rather an issue of how intuitive is it, and how quickly and easily can people coming from other tools (e.g. Interface Builder, Qt Designer, MS IDE) can get used to it. wxGlade does seem to do a nice job of this, but the issue is, again, that sizers are external elements, and you have to add them yourself for even basic layouts. It's just not intuitive, to me, that you have to add a control, then click "Add slot" on the sizer, then add another control, etc. Much more intuitive, I think, to add a control, have wx internally add it to the sizer, and have it pop up on the screen. I know XRCEd does it that way, but it probably is a bit easier to implement things that way since users don't see the interface until they preview. (That's just a guess, though.)
Basically, my primary goal is removing the separation between sizers and controls, so that some of these special features can be replaced by more standardized ones found in other IDEs in order to reduce the learning curve sizers pose.
Thanks,
Kevin
···
On May 22, 2006, at 3:51 PM, Don Dwiggins wrote:
--
Don Dwiggins
Advanced Publishing Technology---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org
For additional commands, e-mail: wxPython-users-help@lists.wxwidgets.org