FlowLayout Plugin for Xojo

DesktopFlowLayout.AddControl Method

Adds a control to the layout

AddControl(
   ctrl as DesktopUIControl)

Parameters

ctrl
The control to be added.

Remarks

If the control implements the AutoWidth, MaxWidth, MinWidth properties as well as the GetOptimalWidth function then the control can be auto scaled by the flow layout, else it can only be moved to account for largest labels for example.

When control has AutoWidth = false, then the FlowLayout will not let it automatically scale.

If AutoWidth is true then the behaviour is as following:

MinWidth = 0 means that minimum with of the control will be the way it looked in design mode, this is handy to make sure a application always looks nice in the invariant language, else for example a OK button would go very small in English.

MinWidth > 0 means that the control will be scaled down when possible, but never to less width than specified by the MinWidth.

MaxWidth = 0 means that the control has no maximum size and can be scaled as needed.

MaxWidth > 0 means that the control cannot be scaled to larger size than the MaxWidth.

If a control such as a text box that is normally only moving to account for labels taking more space has LockLeft and LockRight properties set to true then instead of moving then it will be pinned either to left or to right depending on your GrowMode direction.

See Also

DesktopFlowLayout Control