Text Settings in Windows Forms statusbaradvpanel (StatusBarAdvPanel)

29 Apr 20213 minutes to read

StatusBarAdvPanel has several text settings which will be discussed in this section.

The text for the StatusBarAdvPanel can be set through the following property.

Property Table

StatusBarAdvPanel Property Description
Text Gets / sets the text of the panel.
this.statusBarAdvPanel1.Text = "StatusBarAdvPanel";
Me.statusBarAdvPanel1.Text = "StatusBarAdvPanel"

The method associated with the above property is given below.

NOTE

The GetText() method returns text according to the key state.

Marquee settings

The text inside the control can be made to float in the marquee style by enabling the property given below.

Property Table

StatusBarAdvPanel Property Description
IsMarquee Indicates whether the control uses the marquee style for the displayed text.
this.statusBarAdvPanel1.IsMarquee = true;
Me.statusBarAdvPanel1.IsMarquee = True

Animation settings

The animation that has been applied to the text of the StatusBarAdvPanel control can be customized using the properties given below.

Property Table

StatusBarAdvPanel Property Description
AnimationDelay Indicates the delay for the animation of marquee style.
AnimationDirection Specifies the direction of animation for the marquee style. The options included are as follows.Left andRight.
AnimationSpeed Indicates the animation speed of the marquee style.
AnimationStyle Specifies the style of animation for the marquee style. The options included are as follows.Scroll,Slide andAlternate.

NOTE

The IsMarquee property must be set to ‘True’ for the animation settings to be visible.

this.statusBarAdvPanel1.AnimationDelay = 2;
this.statusBarAdvPanel1.AnimationDirection = Syncfusion.Windows.Forms.Tools.MarqueeDirection.Right;
this.statusBarAdvPanel1.AnimationSpeed = 6;
this.statusBarAdvPanel1.AnimationStyle = Syncfusion.Windows.Forms.Tools.MarqueeStyle.Alternate;
Me.statusBarAdvPanel1.AnimationDelay = 2
Me.statusBarAdvPanel1.AnimationDirection = Syncfusion.Windows.Forms.Tools.MarqueeDirection.Right
Me.statusBarAdvPanel1.AnimationSpeed = 6
Me.statusBarAdvPanel1.AnimationStyle = Syncfusion.Windows.Forms.Tools.MarqueeStyle.Alternate

The animation for the text can be enabled and disabled using the methods associated with the above properties. These methods are given below.

Methods Table

Methods Description
StartAnimation Starts the animation for the marquee style.
StopAnimation Stops the animation for the marquee style. This will restore the text to it's original position.

These methods can be called within the below events as follows.

// Starts the animation.
private void Form1_Load(object sender, EventArgs e)
{
    this.statusBarAdvPanel1.StartAnimation();
}

// Stops the animation.
private void button1_Click(object sender, EventArgs e)
{
    this.statusBarAdvPanel1.StopAnimation();
}
' Starts the animation.
Private Sub Form1_Load(ByVal sender As Object, ByVal e As EventArgs)
Me.statusBarAdvPanel1.StartAnimation()
End Sub

' Stops the animation.
Private Sub button1_Click(ByVal sender As Object, ByVal e As EventArgs)
Me.statusBarAdvPanel1.StopAnimation()
End Sub