reckfellENGINE

FlowContainer

Layout wrapping into new rows or columns.

On this page
class FlowContainerReckfellSharpInherits Container

FlowContainer wraps eligible direct child Controls according to available length: horizontal flow produces rows; vertical flow produces columns. Unlike GridContainer, the column count is not fixed. Base FlowContainer orientation is mutable; HFlowContainer/VFlowContainer fix it and reject SetVertical.

Wrapping depends on available size, child desired/minimum/maximum sizes, SizeFlags and h_separation/v_separation theme constants. Row/column sizes can differ. Ordinary intermediate Entities, TopLevel and hidden Controls do not participate as ordinary layout items. The container replaces manual child Position.

Alignment places spare space within a line. LastWrapAlignment separately aligns the final incomplete line relative to the preceding one when it is not the first line; Inherit uses the main alignment. For example, with width 45 and two 20-wide items in the previous row, End places a final 20-wide item at X = 20 rather than 25. This assumes LTR and zero gaps.

ReverseFill changes filling across the main flow: horizontal rows can run bottom to top; vertical columns fill from the opposite edge with RTL taken into account. Tree child order does not change.

GetLineCount reads the previous layout cache: wait for sorting after resize. HFlow counts rows; VFlow counts columns. Neither child count nor a reliable emptiness test: an empty visible container can retain one empty line after a pass, and hidden containers can retain stale counts.

General container rules.

Declarations checked against C# SDK 1.0.0. Expand a name to see declarations and documentation.

Constructors1

FlowContainerConstructor
# FlowContainer
C#
public FlowContainer();

Creates mutable horizontal flow: Alignment = Begin, LastWrapAlignment = Inherit, ReverseFill = false. Wrapping requires a bounded available length.

Properties4

AlignmentProperty
# Alignment
C#
public FlowContainer.AlignmentMode Alignment { get; set; }

Main Begin/Center/End alignment of spare line space, Begin by default. Not individual-Control alignment or a fixed item count.

LastWrapAlignmentProperty
# LastWrapAlignment
C#
public FlowContainer.LastWrapAlignmentMode LastWrapAlignment { get; set; }

Alignment of the final incomplete line relative to its predecessor when it is not the first line. Inherit uses Alignment. End does not unconditionally mean the entire container’s right/bottom edge.

ReverseFillProperty
# ReverseFill
C#
public bool ReverseFill { get; set; }

Reverses row/column filling across the main axis, false by default. Does not reorder tree children; horizontal placement accounts for RTL.

VerticalProperty
# Vertical
C#
public bool Vertical { get; set; }

false for rows, true for columns. Mutable only on base FlowContainer. Any setter call on HFlowContainer/VFlowContainer is rejected.

Methods9

GetAlignmentFlowContainer.AlignmentMode
# GetAlignment
C#
public FlowContainer.AlignmentMode GetAlignment();

Main Begin/Center/End alignment of spare line space, Begin by default. Not individual-Control alignment or a fixed item count.

Returns FlowContainer.AlignmentMode

Current setting rather than the result of a complete layout pass.

GetLastWrapAlignmentFlowContainer.LastWrapAlignmentMode
# GetLastWrapAlignment
C#
public FlowContainer.LastWrapAlignmentMode GetLastWrapAlignment();

Alignment of the final incomplete line relative to its predecessor when it is not the first line. Inherit uses Alignment. End does not unconditionally mean the entire container’s right/bottom edge.

Returns FlowContainer.LastWrapAlignmentMode

Current setting rather than the result of a complete layout pass.

GetLineCountint
# GetLineCount
C#
public int GetLineCount();

Returns cached line count from the last layout: horizontal rows or vertical columns. Can be stale after resize/hiding; an empty container can report 1 after a pass. Not a child count.

Returns int

Cached line count rather than a guaranteed current count of items/visible rows.

IsReverseFillbool
# IsReverseFill
C#
public bool IsReverseFill();

Reverses row/column filling across the main axis, false by default. Does not reorder tree children; horizontal placement accounts for RTL.

Returns bool

Current setting rather than the result of a complete layout pass.

IsVerticalbool
# IsVertical
C#
public bool IsVertical();

false for rows, true for columns. Mutable only on base FlowContainer. Any setter call on HFlowContainer/VFlowContainer is rejected.

Returns bool

Current setting rather than the result of a complete layout pass.

SetAlignmentvoid
# SetAlignment
C#
public void SetAlignment(FlowContainer.AlignmentMode alignment);

Main Begin/Center/End alignment of spare line space, Begin by default. Not individual-Control alignment or a fixed item count.

Parameters
NameTypeDefault
alignmentFlowContainer.AlignmentMode—
alignment

Begin, Center or End respecting flow direction and RTL.

SetLastWrapAlignmentvoid
# SetLastWrapAlignment
C#
public void SetLastWrapAlignment(FlowContainer.LastWrapAlignmentMode lastWrapAlignment);

Alignment of the final incomplete line relative to its predecessor when it is not the first line. Inherit uses Alignment. End does not unconditionally mean the entire container’s right/bottom edge.

Parameters
NameTypeDefault
lastWrapAlignmentFlowContainer.LastWrapAlignmentMode—
lastWrapAlignment

Inherit or Begin/Center/End relative to the previous line.

SetReverseFillvoid
# SetReverseFill
C#
public void SetReverseFill(bool reverseFill);

Reverses row/column filling across the main axis, false by default. Does not reorder tree children; horizontal placement accounts for RTL.

Parameters
NameTypeDefault
reverseFillbool—
reverseFill

true reverses cross-axis filling; false retains normal filling.

SetVerticalvoid
# SetVertical
C#
public void SetVertical(bool vertical);

false for rows, true for columns. Mutable only on base FlowContainer. Any setter call on HFlowContainer/VFlowContainer is rejected.

Parameters
NameTypeDefault
verticalbool—
vertical

Base FlowContainer axis only: true for columns, false for rows.

FlowContainer.AlignmentMode

ValueDescription
Begin = 0

The child controls will be arranged at the beginning of the container, i.e. top if orientation is vertical, left if orientation is horizontal (right for RTL layout).

Center = 1

The child controls will be centered in the container.

End = 2

The child controls will be arranged at the end of the container, i.e. bottom if orientation is vertical, right if orientation is horizontal (left for RTL layout).

FlowContainer.LastWrapAlignmentMode

ValueDescription
Begin = 1

The last partially filled row or column will wrap aligned to the beginning of the previous row or column.

Center = 2

The last partially filled row or column will wrap aligned to the center of the previous row or column.

End = 3

The last partially filled row or column will wrap aligned to the end of the previous row or column.

Inherit = 0

The last partially filled row or column will wrap aligned to the previous row or column in accordance with FlowContainer.Alignment.

Theme properties

These are Theme resource keys, not C# properties. Use the matching Control GetTheme…() and AddTheme…Override() methods for each value type.

Key and typeDescription
h_separation
int

The horizontal separation of child nodes.

Default: 4
v_separation
int

The vertical separation of child nodes.

Default: 4
Reckfell Engine documentationBack to top ↑
QUICK LINKSGetting startedEntity hierarchyC# & .NET 10Scenes and prefabs
Reckfell guides and full API K
reckfellENGINE
RECKFELL ACCOUNT

Sign in

Sign in to your Reckfell account.

One account for the entire Reckfell platform.