wxFormBuilder Drag & Drop widgets not possible?

Kit Bishop kit at bishop.net.nz
Mon Jan 28 11:50:44 PST 2008


Lars,

If its any consolation, I know exactly where you are coming from.

I came from a background of developing UIs withe absolute positioning
from a pure MS background and knew just how to get things looking just
as I wanted.

Then, I had the need to develop a cross platform application and having
chosen wxWidgets as a framework - its free, its comprehensive, it works
well, its well supported by its contributors.

I started hand constructing all my dialogues etc. with absolute
positioning.  As well as being a pain in the neck to try to do this
directly in code without a GUI designer, I soon came across all the
issues others have described - changes in default font size, screen
resolution etc. could complete mess up my carefully constructed layout -
truncated text, gaps too big etc. etc. - this was even worse when
comparing MS and Linux.

It took me quite a long while to (a) get my head round sizers; (b) come
to grips with their best usage.  However, Having done so, I can now
produce good looking layouts irrespective of the various factors.

Using the various sizer types allows one to specify positional
relationships between GUI elements rather than actual positions.

I find myself using nested sizers quite a lot.  Some important factors
to bear in mind are:

   1. Usage of vertical or horizontal sizers
   2. Judicious use of expand and stretch
   3. Use of spacer to fill in spaces where there is no control
   4. Use of weighting factors to get proportions (can be applied to
      spacers and sizers as well as controls)
   5. Use of various grid sizers for regular grid layouts

I use wxFormBuilder (version 3.0.50 Release Candidate 3 - it seems
pretty stable) primarily because I needed a free tool (for financial
reasosn :-( ) and while I find it has some shortcomings and is at times
a bit clumsy to use (e.g. can't drag the order of controls on the
WYSIWYG display, rather have to drag or cut and paste in the tree
display) I do find it adequate for the task.

Like others, I would encourage you to persevere with sizers.  If you
find wxFormBuilder not to your taste, I have heard good things about the
other GUI designers that have been mentioned - try them and see which
most fits your needs, likes and pocket :-)

Best regards,
Kit Bishop

Julian Smart wrote:
> Lars,
>
> As far as I know all dialog editors for wxWidgets use the sizers
> approach. It's normal for people coming from other backgrounds to
> initially be confused by sizers and wonder why you can't drag controls
> around, but most will suddenly 'get it' after some time and then find
> sizers a better method. wxWidgets does, of course, care about the
> visual appearance of dialogs and other windows - that's the whole
> point of sizers; not just to cater for dynamic layouts but for
> platform and translation adaptation.
>
> So my advice is to persist for a while longer and hopefully the switch
> in your brain will be flipped as other wxWidgets users have found, and
> then they find the sizer experience enjoyable and rewarding for the
> most part, when used in conjunction with a tool. Another way of
> looking at it is, if sizers were so rubbish, wxWidgets would have died
> a long time ago, and major companies would not be using it and saying
> how easy it is to create dialogs with <insert tool of choice here>.
> It's a matter of adjusting. However if you can't adjust, then that's a
> pity but good luck with your quest for a solution.
>
> Regards,
>
> Julian
>
> Lars Uffmann wrote:
>>
>> Eran Ifrah wrote:
>>> The wxFormBuilder follows the wxWidgets' UI approach, it uses sizers.
>>> If u want to make your button bigger and fill up the entire size ->
>>> just set
>>> the appropriate flag for the sizer item (there are 2 button in the
>>> toolbar
>>> that can help u doing it).
>>
>> Actually - no - I did not mainly want to change the size of my button
>> - I want to design my form as >I< think it should be.
>>
>>> You need to design your UI in terms of sizers - when using sizers,
>>> there is
>>> no point in dragging items around the dialog, since they will be
>>> re-arranged
>>> by the sizers.
>>
>> Thank you very much for clearing that up, I guess I do not need to
>> bother with the wxFormBuilder anymore - is this limitation
>> wxWidgets-based? Or can I do absolute positioning with wxWidgets? If
>> that concept of sizers means wxWidgets in general doesn't allow the
>> developer to lay out their own forms, then I'll have to find a
>> different solution.
>>
>> Right now I'm very dissapointed in wxFormBuilder and - possibly - of
>> wxWidgets. I can't understand how anyone could possibly not care
>> about the optics of their form. This is an approach similar to html,
>> only that in html it makes sense, and here it doesn't :( Don't get me
>> wrong, I understand "the idea" of sizers, as I just finished reading
>> it. I just disagree. A dynamically sized application window is the
>> exception, not the rule.
>>
>> After looking into WideStudio, Qt, and now wxWidget, I'm slowly
>> losing hope that there is anything non Microsoft out there with the
>> look & feel of Borland's Delphi/C++ Builder or VB. Am I really asking
>> so much? All I want is a cross-platform combination of IDE &
>> Graphical Window Designer for C++ programming which is NOT Microsoft
>> - preferably non commercial, but heck - I don't mind paying for a
>> decent software, if I can test it first.
>>
>> Sorry for letting out all the frustration here - I've been trying
>> different approaches for 2 weeks now, and it seems like everyone
>> except me is perfectly happy with what they got, and what they got so
>> far has never been acceptable for me. :/ At first it seemed that
>> wxWidgets would at least provide a decent framework - if that now
>> also disqualifies itself, I'm sort of at a dead end...
>>
>> *sigh*
>>
>>    Lars

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.wxwidgets.org/pipermail/wx-users/attachments/20080129/957=
ae096/attachment.htm


More information about the wx-users mailing list