Table of Contents

Method Add

Namespace
Alternet.UI
Assembly
Alternet.UI.dll

Add(Control, int, SizerFlag, int)

Appends a child to the sizer.

ISizerItem Add(Control control, int proportion = 0, SizerFlag flag = SizerFlag.AlignLeft, int border = 0)

Parameters

control Control

The control to be added to the sizer. Its initial size (either set explicitly by the user or calculated internally when using default size) is interpreted as the minimal and in many cases also the initial size.

proportion int

Used in IBoxSizer to indicate if a child of a sizer can change its size in the main orientation of the sizer - where 0 stands for not changeable and a value of more than zero is interpreted relative to the value of other children of the same sizer. For example, you might have a horizontal sizer with three children, two of which are supposed to change their size with the sizer. Then the two stretchable windows would get a value of 1 each to make them grow and shrink equally with the sizer's horizontal dimension.

flag SizerFlag

Item flags affecting sizer's behaviour..

border int

Item border. Determines the border width, if the flag parameter is set to include any border flag.

Returns

ISizerItem

Add(ISizer, int, SizerFlag, int)

Appends a child to the sizer.

ISizerItem Add(ISizer sizer, int proportion = 0, SizerFlag flag = SizerFlag.AlignLeft, int border = 0)

Parameters

sizer ISizer

The (child-)sizer to be added to the sizer. This allows placing a child sizer in a sizer and thus to create hierarchies of sizers (typically a vertical box as the top sizer and several horizontal boxes on the level beneath).

proportion int

Used in IBoxSizer and similar sizers to indicate if a child of a sizer can change its size in the main orientation of the sizer - where 0 stands for not changeable and a value of more than zero is interpreted relative to the value of other children of the same sizer. For example, you might have a horizontal sizer with three children, two of which are supposed to change their size with the sizer. Then the two stretchable windows would get a value of 1 each to make them grow and shrink equally with the sizer's horizontal dimension.

flag SizerFlag

Item flags affecting sizer's behaviour..

border int

Item border. Determines the border width, if the flag parameter is set to include any border flag.

Returns

ISizerItem

Add(int, int, int, SizerFlag, int)

Appends a spacer child to the sizer.

ISizerItem Add(int width, int height, int proportion = 0, SizerFlag flag = SizerFlag.AlignLeft, int border = 0)

Parameters

width int

Width of the spacer.

height int

Height of the spacer.

proportion int

Used in IBoxSizer to indicate if a child of a sizer can change its size in the main orientation of the sizer - where 0 stands for not changeable and a value of more than zero is interpreted relative to the value of other children of the same sizer. For example, you might have a horizontal sizer with three children, two of which are supposed to change their size with the sizer. Then the two stretchable windows would get a value of 1 each to make them grow and shrink equally with the sizer's horizontal dimension.

flag SizerFlag

Item flags affecting sizer's behaviour..

border int

Item border. Determines the border width, if the flag parameter is set to include any border flag.

Returns

ISizerItem

Remarks

width and height specify the dimension of a spacer to be added to the sizer. Adding spacers to sizers gives more flexibility in the design of dialogs; imagine for example a horizontal box with two buttons at the bottom of a dialog: you might want to insert a space between the two buttons and make that space stretchable using the proportion flag and the result will be that the left button will be aligned with the left side of the dialog and the right button with the right side - the space in between will shrink and grow with the dialog.

Add(ISizerItem)

Adds sizer item.

ISizerItem Add(ISizerItem item)

Parameters

item ISizerItem

Sizer item.

Returns

ISizerItem

Add(Control, ISizerFlags)

Appends a child to the sizer.

ISizerItem Add(Control control, ISizerFlags sizerFlags)

Parameters

control Control

The control to be added to the sizer. Its initial size (either set explicitly by the user or calculated internally when using default size) is interpreted as the minimal and in many cases also the initial size.

sizerFlags ISizerFlags

A ISizerFlags object that enables you to specify most of the other parameters more conveniently.

Returns

ISizerItem

Add(ISizer, ISizerFlags)

Appends a child to the sizer.

ISizerItem Add(ISizer sizer, ISizerFlags sizerFlags)

Parameters

sizer ISizer

The (child-)sizer to be added to the sizer. This allows placing a child sizer in a sizer and thus to create hierarchies of sizers (typically a vertical box as the top sizer and several horizontal boxes on the level beneath).

sizerFlags ISizerFlags

A ISizerFlags object that enables you to specify most of the other parameters more conveniently.

Returns

ISizerItem

Add(int, int, ISizerFlags)

Appends a spacer child to the sizer.

ISizerItem Add(int width, int height, ISizerFlags sizerFlags)

Parameters

width int

Width of the spacer.

height int

Height of the spacer.

sizerFlags ISizerFlags

A ISizerFlags object that enables you to specify most of the other parameters more conveniently.

Returns

ISizerItem