ui.Panel.Layout.flow

Returns a layout that places its widgets in a flow, either horizontal or vertical.

By default, widgets take up their natural space within a flow layout panel. Set the "stretch" style property on an added widget to stretch it to fill available space in the relevant direction:

  - horizontal, vertical, both

When multiple widgets are stretched, the available space is split equally among them. Panels are widgets themselves and can be stretched by specifying a "stretch" style property.

UsageReturns
ui.Panel.Layout.flow(direction, wrap)ui.Panel.Layout
ArgumentTypeDetails
directionString, optional

The direction of the flow. One of

'horizontal' or 'vertical'. Defaults to 'vertical'.

wrapBoolean, optional

Whether to wrap children in the layout if there are too many to show in one line. Defaults to false.

Examples

JavaScript

// Your example goes here!

Python

# Your example goes here!