This Question is Assumed Answered

1 "correct" answer available (5 pts) 14 "helpful" answers available (3 pts)
6 Replies Last post: Mar 25, 2008 9:29 AM by rhh

VLE & FreeForm Designer

Mar 19, 2008 4:01 AM

Click to view URPradhan's profile Level 7 URPradhan 141 posts since
Mar 6, 2008
Hi

I'm here again with a VLE query. Prior to Curl I've worked on few UI related languages/tools like VB/MFC/Qt mainly for desktop apps (Win/Linux).

But when I'm trying to design my layout in VLE; it positions the controls of it own and now allowing me to design the layout like Visual Basic's "FREE FORM" design.

Lets say, when I'm using a group box and wants to add multiple controls like option buttons, command buttons, drop-down-list, the VLE does not allowing me to design it freely, rather just replaces the earlier control from the group-box and shows the recently added control :( I'm confused with the VLE designer as I was expecting it similar to VB designer.

Plz help me, If I'm missing anything here.

Thank you

Note: Sorry for the duplicate thread, posted twice coz of pressing F5 in my FF :)

Click to view friedger's profile MVP friedger 108 posts since
Jan 13, 2008
1. Re: VLE & FreeForm Designer Mar 19, 2008 4:18 AM

GroupBox is like Frame a single child container.

In order to add more than one control add first a multi-child container, like Canvas, HBox, VBox. Then add the controls into the multi-child container.

If you use Canvas as multi-child container you can freely position your controls.

Happy desiging!

Friedger

Click to view URPradhan's profile Level 7 URPradhan 141 posts since
Mar 6, 2008
2. Re: VLE & FreeForm Designer Mar 19, 2008 8:54 PM
in response to: friedger

Oh ! Is it ?

1. GroupBox is a single child container ? Then what it groups ? Really surprised.

GroupBox is a container which should host multiple controls and having a suitable name in left-top corner.

2. May be I'm expecting like how VB forms works. Btw, why I cannot place multiple control in a dialog layout ?

When I'm trying to place multiple controls in a Dialog layout the previous controls goes out and the only the recent controls sits there and which also cannot be placed freely anywhere in the dialog (it selects its own position may be at center) :(

//Thank you

Click to view friedger's profile MVP friedger 108 posts since
Jan 13, 2008
3. Re: VLE & FreeForm Designer Mar 20, 2008 2:26 AM
in response to: URPradhan

Hi,

1.) Mainly it is a box and therefore can only host one child. That is the reason why one control is replace by the other when adding a second control.

The GroupBox provides the facility to show content as a group, i.e. with border and title. However, the group box does not decide about the layout of the children, therefore a multi-child container is required. Otherwise the code for grouping (border and tirle) would have to be duplicate for HBox, VBox, Canvas, etc.

This concept of having a Box or Frame with additional functionality occurs often. For example the GuiRangeSelectionFrame allows to select a range of gui elements (controls, text etc.), however it is a single-child container and only allows on child. This usually is a multi-child container like HBox, VBox or Canvas.

Thereby, there is a clear separation between the additional functionality (provided by a Frame or Box) and the layout of multiple children (provided by HBox, VBox, Canvas). Thus, it is easy to combine these two aspects.

2.) Again, Dialog is a single-child container. You have to add first a container that defines the layout (HBox, VBox, Canvas) to the dialog and then add the controls to it.

@Curl: It might be a good idea to mark single-child and multi-child containers differently.

Friedger

Click to view RMH's profile Curl RMH 45 posts since
Feb 17, 2008
4. Re: VLE & FreeForm Designer Mar 20, 2008 7:24 AM
Friedger,

Thank you for addressing URPradhan's questions - your answers are, as always, excellent. I really like the suggestion that we mark single-child and multi-child containers differently. I'll talk to the engineers about adding this in the next release.

URPradhan,

I hope Friedger answers are as helpful as they appear. Welcome to the Curl community - please let me know if you have issues that cannot be handled on this form.


All the best,

Richard

Click to view URPradhan's profile Level 7 URPradhan 141 posts since
Mar 6, 2008
5. Re: VLE & FreeForm Designer Mar 23, 2008 10:17 PM
in response to: RMH

@Friedger : I agree & understood what your are saying. But at first sight it (the concepts of UI controls) confuses the UI developlers who have worked on other tools/ languages like me. But I got a way around to put multiple controls in a GroupBox (though its a single-child container and groups NOTHING !) by putting a table/VBox/HBox inside the GroupBox.


@RMH : Thank you for your helping hands and definitely I'll share my issues, if there would be any.


//Thank you

Click to view rhh's profile Curl rhh 29 posts since
Oct 12, 2007
6. Re: VLE & FreeForm Designer Mar 25, 2008 9:30 AM
in response to: URPradhan
Friedger,

I'd also like to add my thanks to you for explaining the GUI architecture more clearly than I would have done it myself.

URPradhan,

Your technique of putting a Table or other layout container inside of a GroupBox or Dialog is exactly the technique that we would recommend. The purpose of a GroupBox is to display a border and label for a group of objects that are inside. Since people may have different ideas about how they want to lay out the objects in the group, we support that by having you put different layout containers (Table, Canvas, or whatever) inside the group box, according to the layout policy that you want to use for the objects in your group. I'm sorry that you didn't find the name of GroupBox to be good for this purpose, but that's what it does.

-Bert