LayoutInsertWidget

Syntax

Item = LayoutInsertWidget(Layout, Widget, Index=#PG_Last, Flags=#Null)

Description

Inserts an existing widget into the specified layout container at a targeted index position.

Parameters

Layout
The layout to insert the widget into. Uses the current layout if #Null.

Widget
The widget to insert.

Index (optional)
The zero-based position in the layout hierarchy to insert the widget. Use #PG_Last (default) to append it to the end, or #PG_First for the beginning.

Flags (optional)
Initialization flags, identical to those used in CreateWidget().

Return Value

Returns a pointer to the internal LayoutItem tracking structure if successful. Returns #False if the parameters are invalid or the widget is already a member of this exact layout.

Remarks

This command unbinds the widget from its previous layout (if any) and binds it to the target layout. The layout engine is automatically signaled to update and redraw.

See Also

CreateWidget

Supported OS

Windows, Linux