0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

【WindowsForm】FlowLayoutPanelの使い方

Last updated at Posted at 2025-12-06

環境

・Visual Studio 2022
・.Net 9.0
・Windows Forms

FlowLayoutPanelとは

水平方向または垂直方向に要素(ボタンやラベルなど)を自動的に配置してくれるコンポーネントです。
位置の調整が面倒なときなどに便利。
均等に配置できるので、見た目も整いやすい。

デザイン上での使い方

コンポーネントからFlowLayoutPanelを選択して配置
スクリーンショット 2025-11-29 223505.png

要素をFlowLayoutPanel内に入れると、自動的に配置してくれる。
flow.gif

配置する向きをFlowDirectionプロパティで設定できます。
スクリーンショット 2025-11-29 223907.png

折り返しを行うかどうかをWrapContentsプロパティで設定できます。
スクリーンショット 2025-11-29 224104.png

Panelなどでグループ化されたものを配置して非表示にしても自動調整してくれるので、動的に表示・非表示を変更してもレイアウトを整えたい場合にも使えます。
flow2.gif

株式会社ONE WEDGE

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?