[Gambas-user] Panel Autoresize and alignment properties

Benoit Minisini benoit.minisini at ...2...
Tue Mar 7 21:24:17 CET 2006


On Tuesday 07 March 2006 10:41, GuruLounge - MailLists wrote:
> I've been attempting to get the panel object to automatically resize to
> fit around the objects within it.  It seems to just get smaller, not
> bigger on startup.  I'm deliberately making the panel smaller than the
> objects in it to test this.
>
> I also notice the arrangement property doesn't seem to have any effect.
>
> Is there something I'm missing here?
>
> Jeff

The Arrangement property will just arrange the panel contents, but will never 
change the size of the panel.

When the AutoResize property is set, the panel will change its width (for an 
Horizontal or TopLeft arrangement) or its height (for a Vertical or LeftRight 
arrangement) to fit the larger or higher child controls.

The panel will never change both its width and height to fit the contents.

To make something like a icon, the better is:
* Setting panel Arrangement to Vertical.
* Setting panel AutoResize to TRUE.
* Make the PictureBox with Strechable set to FALSE and Alignment to Center.

Then you have to manually decide the width of the panel.

Regards,

-- 
Benoit Minisini





More information about the User mailing list