# FlowLayoutPanel

Namespace: **Wisej.Web**

Assembly: **Wisej.Framework** (2.5.0.0)

* [Control](https://docs.wisej.com/api/v2.5/wisej.web/general/control)
  * [ScrollableControl](https://docs.wisej.com/api/v2.5/wisej.web/containers/scrollablecontrol)
    * [Panel](https://docs.wisej.com/api/v2.5/wisej.web/containers/wisej.web.panel)
      * [FlowLayoutPanel](https://docs.wisej.com/api/v2.5/wisej.web/containers/flowlayoutpanel)

Represents a panel that dynamically arranges its children horizontally or vertically in automatic rows or columns.

{% tabs %}
{% tab title="C#" %}

```csharp
public class FlowLayoutPanel : Panel, IExtenderProvider
```

{% endtab %}

{% tab title="VB.NET" %}

```visual-basic
Public Class FlowLayoutPanel
    Inherits Panel
    Implements IExtenderProvider
```

{% endtab %}
{% endtabs %}

Arranges child controls horizontally or vertically. Ignores the control location, dock style and anchoring. Uses the following properties of the child controls:

* [Margin](https://docs.wisej.com/api/v2.5/general/control#margin) Increases the space around the control.
* FillWeight Stretches the width of control proportionally, according to the fill weights of all the children, to use the remaining space in the row.
* [MinimumSize](https://docs.wisej.com/api/v2.5/general/control#minimumsize) Enforces the minimum size of controls stretched using the FillWeight value.
* [MaximumSize](https://docs.wisej.com/api/v2.5/general/control#maximumsize) Enforces the maximum size of controls stretched using the FillWeight value.
* FlowBreak Determines whether to create a new row or a new column after the control.

Uses the following properties of the parent [FlowLayoutPanel](https://docs.wisej.com/api/v2.5/wisej.web/containers/flowlayoutpanel) control:

* [FlowDirection](#flowdirection) Wraps child controls to a new column ([TopDown](https://docs.wisej.com/api/v2.5/wisej.web/containers/wisej.web.flowdirection#fields), or [BottomUp](https://docs.wisej.com/api/v2.5/wisej.web/containers/wisej.web.flowdirection#fields)) or to a new row ([LeftToRight](https://docs.wisej.com/api/v2.5/wisej.web/containers/wisej.web.flowdirection#fields), [RightToLeft](https://docs.wisej.com/api/v2.5/wisej.web/containers/wisej.web.flowdirection#fields)).
* [WrapContents](#wrapcontents) When set to false, child controls do not wrap and are either clipped or scrolled.
* [Padding](#padding) Increases the distance between the child controls and the borders of the parent panel.

## Constructors

### ![](https://314832588-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MTHCfAYyBPycFG90wsw-4198400543%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media\&token=060b281d-9363-48a1-a0f9-788ad1831e96)FlowLayoutPanel()

Initializes a new instance of the [FlowLayoutPanel](https://docs.wisej.com/api/v2.5/wisej.web/containers/flowlayoutpanel) class.

## Properties

### ![](https://314832588-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MTHCfAYyBPycFG90wsw-4198400543%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media\&token=060b281d-9363-48a1-a0f9-788ad1831e96)FlowDirection

[FlowDirection](https://docs.wisej.com/api/v2.5/wisej.web/containers/flowlayoutpanel/wisej.web.flowdirection): Returns or sets a value indicating the flow direction of the [FlowLayoutPanel](https://docs.wisej.com/api/v2.5/wisej.web/containers/flowlayoutpanel) control.

### ![](https://314832588-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MTHCfAYyBPycFG90wsw-4198400543%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media\&token=060b281d-9363-48a1-a0f9-788ad1831e96)LayoutEngine

[LayoutEngine](https://github.com/iceteagroup/wisej-docs-api/blob/v2.5/wisej.web.layout/containers/layoutengine/layoutengine/README.md): Returns the control's layout engine.

### ![](https://314832588-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MTHCfAYyBPycFG90wsw-4198400543%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media\&token=060b281d-9363-48a1-a0f9-788ad1831e96)WrapContents

[Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean): Returns or sets whether the [FlowLayoutPanel](https://docs.wisej.com/api/v2.5/wisej.web/containers/flowlayoutpanel) control should wrap its contents or let the contents be clipped.

## Methods

### ![](https://314832588-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MTHCfAYyBPycFG90wsw-4198400543%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media\&token=060b281d-9363-48a1-a0f9-788ad1831e96)GetFillWeight(control)

Determines whether to proportionally stretch the width or the control to fill the remaining space it the containing row.

| Parameter   | Type                                                                 | Description        |
| ----------- | -------------------------------------------------------------------- | ------------------ |
| **control** | [Control](https://docs.wisej.com/api/v2.5/wisej.web/general/control) | The child control. |

**Returns:** [Int32](https://docs.microsoft.com/en-us/dotnet/api/system.int32). The fill weight value associated with the control.

The FillWeight property defines the relative width of a control in a row managed by the [FlowLayoutPanel](https://docs.wisej.com/api/v2.5/wisej.web/containers/flowlayoutpanel). The default value is 0 and the maximum value is 100 (the control will fill all the remaining width of the row.)

### ![](https://314832588-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MTHCfAYyBPycFG90wsw-4198400543%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media\&token=060b281d-9363-48a1-a0f9-788ad1831e96)GetFlowBreak(control)

Determines whether to create a new row or a new column, depending on the value of the [FlowDirection](#flowdirection) property, after the control.

| Parameter   | Type                                                                 | Description        |
| ----------- | -------------------------------------------------------------------- | ------------------ |
| **control** | [Control](https://docs.wisej.com/api/v2.5/wisej.web/general/control) | The child control. |

**Returns:** [Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean). true if the flow break is set; otherwise, false.

### ![](https://314832588-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MTHCfAYyBPycFG90wsw-4198400543%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media\&token=060b281d-9363-48a1-a0f9-788ad1831e96)SetFillWeight(control, value)

Determines whether to proportionally stretch the width or the control to fill the remaining space it the containing row.

| Parameter   | Type                                                                 | Description                   |
| ----------- | -------------------------------------------------------------------- | ----------------------------- |
| **control** | [Control](https://docs.wisej.com/api/v2.5/wisej.web/general/control) | The child control.            |
| **value**   | [Int32](https://docs.microsoft.com/en-us/dotnet/api/system.int32)    | The fill weight value to set. |

The FillWeight property defines the relative width of a control in a row managed by the [FlowLayoutPanel](https://docs.wisej.com/api/v2.5/wisej.web/containers/flowlayoutpanel). The default value is 0 and the maximum value is 100 (the control will fill all the remaining width of the row.) **Throws:**

* [ArgumentOutOfRangeException](https://docs.microsoft.com/en-us/dotnet/api/system.argumentoutofrangeexception) The value is less than 0 or greater than 100.

### ![](https://314832588-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MTHCfAYyBPycFG90wsw-4198400543%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media\&token=060b281d-9363-48a1-a0f9-788ad1831e96)SetFlowBreak(control, value)

Determines whether to create a new row or a new column, depending on the value of the [FlowDirection](#flowdirection) property, after the control.

| Parameter   | Type                                                                  | Description                  |
| ----------- | --------------------------------------------------------------------- | ---------------------------- |
| **control** | [Control](https://docs.wisej.com/api/v2.5/wisej.web/general/control)  | The child control.           |
| **value**   | [Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean) | The flow-break value to set. |

## Inherited By

| Name                                                                                                  | Description                                                                                                  |
| ----------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------ |
| [BindingNavigator](https://docs.wisej.com/api/v2.5/wisej.web/data-binding/wisej.web.bindingnavigator) | Represents the navigation and manipulation user interface (UI) for controls that are bound to a data source. |

## Implements

| Name                                                                                                      | Description                                                                                                                                   |
| --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- |
| [IBindableComponent](https://docs.wisej.com/api/v2.5/wisej.web/data-binding/wisej.web.ibindablecomponent) | Bindable components implement this interface.                                                                                                 |
| [IWisejComponent](https://docs.wisej.com/api/v2.5/wisej.core/interfaces/wisej.core.iwisejcomponent)       | All wisej components implement this interface.                                                                                                |
| [IWisejControl](https://docs.wisej.com/api/v2.5/wisej.core/interfaces/wisej.core.iwisejcontrol)           | All wisej controls derived from the [Control](https://docs.wisej.com/api/v2.5/wisej.web/general/control) class must implement this interface. |
| [IWisejSerializable](https://docs.wisej.com/api/v2.5/wisej.core/interfaces/wisej.core.iwisejserializable) | Allows an object to serialize itself.                                                                                                         |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.wisej.com/api/v2.5/wisej.web/containers/flowlayoutpanel.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
