Alignment Settings in Windows Forms Status Bar (StatusBarAdv)

9 Dec 2019 / 1 minute to read

The panels and child controls that are added to the StatusBarAdv control can be aligned according to the needs of the user using the property given below.

Property Table

StatusBarAdv Property Description
Alignment Determines the alignment of the panels. The options included are given below.Center,Near,Far andChildConstraints.
this.statusBarAdv1.Alignment = Syncfusion.Windows.Forms.Tools.FlowAlignment.Center;
Me.statusBarAdv1.Alignment = Syncfusion.Windows.Forms.Tools.FlowAlignment.Center


If the Alignment property is set to ‘ChildConstraints’, the positioning and resizing of the panels and child controls can be set by calling the SetHAlign() method.

Method Table

Method Description
SetHAlign Sets the horizontal alignment options for the control.

The parameters discussed for the SetHAlign() method are as follows.

Parameter Table

Parameters Description
control The control whose HAlign has to be set.
align Represents the alignment option to be set for the specified control. It includes the options given below.Center,Left,Right andJustify.The 'Justify' option will expand the panel to occupy any extra spaces in the control.
this.statusBarAdv1.Alignment = Syncfusion.Windows.Forms.Tools.FlowAlignment.ChildConstraints;

// Sets the horizontal alignment using the SetHAlign() method.
this.statusBarAdv1.SetHAlign(this.statusBarAdvPanel1, Syncfusion.Windows.Forms.Tools.HorzFlowAlign.Justify);
Me.statusBarAdv1.Alignment = Syncfusion.Windows.Forms.Tools.FlowAlignment.ChildConstraints

' Sets the horizontal alignment using the SetHAlign() method.
Me.statusBarAdv1.SetHAlign(Me.statusBarAdvPanel1, Syncfusion.Windows.Forms.Tools.HorzFlowAlign.Justify)



The panels can be aligned using the HAlign property of the StatusBarAdvPanel control. See Alignment Settings topic under StatusBarAdvPanel.