TheDeveloperBlog.com

Home | Contact Us

C-Sharp | Java | Python | Swift | GO | WPF | Ruby | Scala | F# | JavaScript | SQL | PHP | Angular | HTML

<< Back to C-SHARP

FlowLayoutPanel Control

FlowLayoutPanel simplifies how controls are arranged. With FlowLayoutPanel, we have the controls flow like text from left to right, top to bottom, or the opposite directions. No pixel-based positioning is required for these controls.
Add. To get started, please open your Windows Forms program. Now add a FlowLayoutPanel instance to your Form. You can do this by dragging the FlowLayoutPanel from the Toolbox to the Form.

Next: Add some sub-controls by dragging controls such as Button, Label, CheckBox and TextBox to the inner part of the FlowLayoutPanel.

Anchor. It is usually a good idea to anchor your FlowLayoutPanel to other parts of the Form. I typically anchor controls to the top, right, left and bottom of the form to ensure they resize when the window is resized by the user or other code.
FlowDirection. The unique feature of the FlowLayoutPanel is its support for flowing in different directions. The default flow direction is left to right, like English text. The introductory screenshot in this article shows the FlowDirection of TopDown.

Tip: For the FlowDirection property, you can also use RightToLeft and BottomUp values.

AutoScroll. In some programs, the FlowLayoutPanel may end up being too small to show all the controls. In this case, you can set the AutoScroll property to True. The FlowLayoutPanel will display scrollbars when the controls overflow.
Summary. With FlowLayoutPanel we arrange controls. It takes most of the hassle out of arranging controls. Instead of using complex table layouts or pixel layouts, FlowLayoutPanel introduces a graceful flow of controls into your program.
© TheDeveloperBlog.com
Home
The Dev Codes

Related Links:


Related Links

Adjectives Ado Ai Android Angular Antonyms Apache Articles Asp Autocad Automata Aws Azure Basic Binary Bitcoin Blockchain C Cassandra Change Coa Computer Control Cpp Create Creating C-Sharp Cyber Daa Data Dbms Deletion Devops Difference Discrete Es6 Ethical Examples Features Firebase Flutter Fs Git Go Hbase History Hive Hiveql How Html Idioms Insertion Installing Ios Java Joomla Js Kafka Kali Laravel Logical Machine Matlab Matrix Mongodb Mysql One Opencv Oracle Ordering Os Pandas Php Pig Pl Postgresql Powershell Prepositions Program Python React Ruby Scala Selecting Selenium Sentence Seo Sharepoint Software Spellings Spotting Spring Sql Sqlite Sqoop Svn Swift Synonyms Talend Testng Types Uml Unity Vbnet Verbal Webdriver What Wpf