[Gambas-user] Concept of containers

Fabien Bodard gambas.fr at ...626...
Wed Sep 16 08:23:49 CEST 2009


it's like a web page !

on container
- you have an align properties in form, panel, and some other container

      (some container are specific: vbox, hbox, etc (so they do not
have align properties.))

- you have padding and spacing properties


on child
- an ignore propertiy (that say to the control and his container to
not take care of him ... so it is not automatiquely moved.

- an expand property that say if the child take all the free space in
the container (if more that one children in the container have this
property set true, then the parent divide the place between each
child.

Now you can do everything ! and you do not have to manage the resizing
of your controls !

(just a tip :... to place a cotrole to the right in a toolbar panel:
arrange: Horizontal ... just put an empty panel in the left of your
button and set it's expand property to true...)

Regards,

Fabien Bodard






2009/9/15 richard terry <rterry at ...1946...>:
> On Wednesday 16 September 2009 06:33:37 M. Cs. wrote:
>> I don't understand the concept of containers. When I want to create a UI
>> which would proportionally change its size (e.g. when I double the size of
>> the form, every item doubles its size), do I have to cover all the area of
>> form with panels or vboxes (what's this?), and then to place the real stuff
>> (buttons, labels, views etc.) inside them?
>> What is the use of containers? Could someone explain me the concept?
>> ---------------------------------------------------------------------------
>>--- Come build with us! The BlackBerry® Developer Conference in SF, CA
>> is the only developer event you need to attend this year. Jumpstart your
>> developing skills, take BlackBerry mobile applications to market and stay
>> ahead of the curve. Join us from November 9-12, 2009. Register now!
>> http://p.sf.net/sfu/devconf
>> _______________________________________________
>> Gambas-user mailing list
>> Gambas-user at lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/gambas-user
>
> Same concept, really simple but you will never learn this unless you do it
> yourself - ie put the controls on the form, set the propertikkes and watch
> what happends.
>
>
> re-read this:
>
> 1) If you set the form arrangement to fill it will fill itself with whatever
> the control is that you have stuck on the form.
> 2) If you put things withing a container stuck on a form like that, then the
> properties of the container determine what happens to its children.
>
> Play with them.
>
> a VBox is a container who stacks its children vertically, ie if you put
> button1,2,3,4 underneath each other in a vbox  they will be stacked on stop on
> each other. How the buttons behave will depend on what  you do with their
> properites of expand.
>
> Just try it!!!!!!!!!!!!!!!!!
>
> Richard
>
> ------------------------------------------------------------------------------
> Come build with us! The BlackBerry® Developer Conference in SF, CA
> is the only developer event you need to attend this year. Jumpstart your
> developing skills, take BlackBerry mobile applications to market and stay
> ahead of the curve. Join us from November 9-12, 2009. Register now!
> http://p.sf.net/sfu/devconf
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>




More information about the User mailing list