ComponentOne Sizer 8.0
AutoSizeChildren Property

Returns or sets how the control resizes the controls inside it.

Syntax

[form!]C1Elastic.AutoSizeChildren[ = AutoSizeSettings ]

Remarks

This is the most important property in the Elastic control. It governs how the Elastic's child controls are resized and moved during resizing. Together with the Align and FontResize properties, it governs most of the Elastic's resizing capabilities.

The settings for the AutoSizeChildren property are described below:

0 - azNone

This setting disables the Elastic's auto sizing.

1 - azEvenHorz, 3 - azEvenVert

These settings distribute all child controls evenly across or down the Elastic control. You can add, delete, or reorder controls inside the Elastic by moving them around with the mouse. These settings are useful to implement button panels, tool bars, and data-entry forms.

2 - azUnevenHorz, 4 - azUnevenVert

These settings are similar to the azEvenHorz and azEvenVert settings, except only the topmost control is resized. These settings are useful to implement status bars and split (Windows Explorer-type) forms. If you set the Splitter property to True, then the user can resize the controls at runtime using the mouse.

5 - azElastHorz, 6 - azElastVert

These settings are similar to the azEvenHorz and azEvenVert settings, except they only affect nested Elastics.

7 - azProportional

This setting keeps the relative size and position of all child controls constant when the Elastic is resized.

8 - azGrid

This is the most powerful setting. The Grid mode resembles a piece of graph paper, and each control occupies one or more of the little boxes on the paper. When you resize the Elastic, the graph paper stretches, and the controls move with it. The size of the grid is determined by the GridRows and GridCols properties.

The spacing around and between the child controls is determined by the BorderWidth and ChildSpacing properties.

The AutoSizeChildren property works even at design time, so you can use it as a layout tool in addition to supplying dynamic resizing capabilities to your applications. If this feature get in the way of designing the form, you can temporarily disable automatic resizing by setting the FreezeElastics property to False.

Data Type

AutoSizeSettings (Enumeration)

 

 


Copyright (c) GrapeCity, inc. All rights reserved.

Product Support Forum  |  Documentation Feedback