Configuring BorderLayout in Windows Forms LayoutManagers
4 Feb 20251 minute to read
The configuration settings for the BorderLayout control have been given in this section.
Spacing
The horizontal and vertical gaps between the child controls can be set using the following properties.
| BorderLayout properties | Description |
|---|---|
|
HGap |
Gets or sets the horizontal spacing between the layout border and the components. |
|
VGap |
Gets or sets the vertical spacing between the layout border and the components. |
this.borderLayout1.HGap = 10;
this.borderLayout1.VGap = 10;Me.borderLayout1.HGap = 10
Me.borderLayout1.VGap = 10
Configuring child controls
The child controls can be aligned to various positions (North, South, East, West, and Center) using the following property.
| Child control property | Description |
|---|---|
|
Position on borderLayout |
Gets or sets the border position for a child components. |
NOTE
This property is added as an extended property in the properties window of the child control added to BorderLayout.
this.borderLayout1.SetPosition(this.btnNorth, Syncfusion.Windows.Forms.Tools.BorderPosition.North);Me.borderLayout1.SetPosition(Me.btnNorth, Syncfusion.Windows.Forms.Tools.BorderPosition.North)
