Implementing Status Bar Panels (StatusBarAdvPanel)
This skill guides the implementation of the Syncfusion StatusBarAdvPanel control in Windows Forms applications. StatusBarAdvPanel is a panel-derived class that displays status bar information with enhanced appearance, marquee animation, and can be used both within StatusBarAdv controls and standalone on forms.
When to Use This Skill
Use this skill when you need to:
- Create individual status bar panels with custom content and styling
- Display key state indicators (NumLock, CapsLock, ScrollLock, Insert key)
- Show date/time information in various formats (short date, long date, short time, long time)
- Display culture information (CurrentCulture) in status bars
- Implement marquee text animation with scrolling, sliding, or alternating effects
- Apply gradient backgrounds or patterns to status bar panels
- Configure panel alignment within StatusBarAdv or flow layouts
- Add custom borders (2D or 3D) to individual panels
- Handle property change events for dynamic panel updates
- Create themed status bar panels matching application design
Component Overview
StatusBarAdvPanel is a versatile panel control designed for status bars with:
- Panel Types: Predefined types for key states, date/time, culture, or custom text
- Marquee Animation: Scrolling text with customizable speed, direction, and style
- Enhanced Backgrounds: Gradient, pattern, and solid color options using BrushInfo
- Icon Support: Display icons alongside panel text
- Alignment Options: Content alignment (Left, Right, Center) and flow alignment (including Justify)
- Border Customization: 2D and 3D border styles with custom colors
- Auto-Sizing: Automatic resizing based on content (SizeToContent)
- Theme Support: ThemesEnabled and IgnoreThemeBackground properties
- ToolTip Support: Add tooltips to provide additional information
- 18 Property Events: Comprehensive event handling for property changes
Assembly: Syncfusion.Tools.Windows
Dependencies: Syncfusion.Shared.Base, Syncfusion.Tools.Windows
Namespace: Syncfusion.Windows.Forms.Tools
Documentation and Navigation Guide
Getting Started
📄 Read: references/getting-started.md
When to read: First time implementing StatusBarAdvPanel, setting up assemblies, or creating basic panels.
- Assembly requirements and installation
- Designer-based setup with drag-and-drop
- Programmatic creation and initialization
- Adding panels to StatusBarAdv or forms
- Basic configuration (Location, Size, BackgroundColor)
- PanelType and BorderColor setup
- Troubleshooting common setup issues
Panel Types and Behavior
📄 Read: references/panel-types-and-behavior.md
When to read: Configuring panel types, displaying key states or date/time, or customizing panel sizing.
- PanelType property options (key states, date/time, culture, custom)
- Key state indicators (NumLock, CapsLock, ScrollLock, InsertKey)
- Date/time formats (ShortDate, LongDate, ShortTime, LongTime)
- Custom text panels with Text property
- GetText() method for key state text retrieval
- SizeToContent for automatic panel resizing
- PreferredSize property configuration
Appearance and Styling
📄 Read: references/appearance-styling.md
When to read: Customizing panel appearance, applying gradients, setting background colors, or adding icons.
- BackgroundColor property with BrushInfo
- Gradient styles (6 types: ForwardDiagonal, BackwardDiagonal, Horizontal, Vertical, PathRectangle, PathEllipse)
- Pattern styles (Cross, DiagonalCross, DottedGrid, LargeGrid, Wave)
- GradientBackground and GradientColors configuration
- BackColor and ForeColor customization
- Icon property for panel icons
- Complete styling examples
Text and Marquee Animation
📄 Read: references/text-and-marquee.md
When to read: Implementing marquee text animation, configuring scrolling effects, or controlling animation behavior.
- Text property configuration
- IsMarquee property for enabling animation
- AnimationDelay for timing control
- AnimationDirection (Left/Right)
- AnimationSpeed customization
- AnimationStyle (Scroll, Slide, Alternate)
- StartAnimation() and StopAnimation() methods
- Complete marquee examples
Alignment and Borders
📄 Read: references/alignment-and-borders.md
When to read: Configuring panel alignment, customizing borders, or setting up flow layout positioning.
- Alignment property (Left, Right, Center)
- HAlign property for flow layout (Left, Right, Center, Justify)
- BorderStyle property (None, FixedSingle, Fixed3D)
- Border3DStyle options (10 styles)
- BorderColor for 2D borders
- BorderSingle styles (Solid, Dashed, Dotted, Inset, Outset, None)
- BorderSides configuration (Left, Top, Right, Bottom, Middle, All)
- 2D vs 3D border examples
Themes, ToolTips, and Events
📄 Read: references/themes-tooltips-events.md
When to read: Implementing themes, adding tooltips, or handling property change events.
- ThemesEnabled property
- IgnoreThemeBackground property
- ToolTip property configuration
- 18 property change events
- Event subscription examples
- Event handling patterns
- Complete event monitoring example
Quick Start Example
Basic StatusBarAdvPanel with Gradient Background
C#:
using Syncfusion.Windows.Forms.Tools;
using Syncfusion.Drawing;
using System.Drawing;
using System.Windows.Forms;
public partial class MainForm : Form
{
private StatusBarAdvPanel statusBarAdvPanel1;
public MainForm()
{
InitializeComponent();
SetupStatusBarPanel();
}
private void SetupStatusBarPanel()
{
// Create StatusBarAdvPanel
statusBarAdvPanel1 = new StatusBarAdvPanel
{
// Set panel location and size
Location = new Point(160, 184),
Size = new Size(216, 48),
// Configure panel type to show long date
PanelType = StatusBarAdvPanelType.LongDate,
// Apply gradient background
BackgroundColor = new BrushInfo(
GradientStyle.BackwardDiagonal,
Color.PaleVioletRed,
Color.PeachPuff
),
// Set border and alignment
BorderColor = Color.Black,
HAlign = HorzFlowAlign.Left
};
// Add to form
this.Controls.Add(statusBarAdvPanel1);
}
}
VB.NET:
Imports Syncfusion.Windows.Forms.Tools
Imports Syncfusion.Drawing
Imports System.Drawing
Imports System.Windows.Forms
Public Partial Class MainForm
Inherits Form
Private statusBarAdvPanel1 As StatusBarAdvPanel
Public Sub New()
InitializeComponent()
SetupStatusBarPanel()
End Sub
Private Sub SetupStatusBarPanel()
' Create StatusBarAdvPanel
statusBarAdvPanel1 = New StatusBarAdvPanel With {
.Location = New Point(160, 184),
.Size = New Size(216, 48),
.PanelType = StatusBarAdvPanelType.LongDate,
.BackgroundColor = New BrushInfo(
GradientStyle.BackwardDiagonal,
Color.PaleVioletRed,
Color.PeachPuff
),
.BorderColor = Color.Black,
.HAlign = HorzFlowAlign.Left
}
' Add to form
Me.Controls.Add(statusBarAdvPanel1)
End Sub
End Class
Common Patterns
Pattern 1: Marquee Panel with Scrolling Text
Create an animated status panel with marquee scrolling text:
// Configure marquee panel
var marqueePanel = new StatusBarAdvPanel
{
Text = "Welcome to our application! Latest updates available...",
IsMarquee = true,
AnimationStyle = MarqueeStyle.Scroll,
AnimationDirection = MarqueeDirection.Left,
AnimationSpeed = 5,
AnimationDelay = 10,
Size = new Size(300, 30),
BackColor = Color.LightBlue
};
// Start animation on form load
marqueePanel.StartAnimation();
// Stop animation when needed
// marqueePanel.StopAnimation();
Pattern 2: Key State Indicator Panels
Create panels displaying keyboard key states:
// NumLock indicator
var numLockPanel = new StatusBarAdvPanel
{
PanelType = StatusBarAdvPanelType.NumLockState,
Size = new Size(80, 24),
HAlign = HorzFlowAlign.Right,
BackgroundColor = new BrushInfo(Color.WhiteSmoke)
};
// CapsLock indicator
var capsLockPanel = new StatusBarAdvPanel
{
PanelType = StatusBarAdvPanelType.CapsLockState,
Size = new Size(80, 24),
HAlign = HorzFlowAlign.Right,
BackgroundColor = new BrushInfo(Color.WhiteSmoke)
};
// InsertKey indicator
var insertKeyPanel = new StatusBarAdvPanel
{
PanelType = StatusBarAdvPanelType.InsertKeyState,
Size = new Size(80, 24),
HAlign = HorzFlowAlign.Right,
BackgroundColor = new BrushInfo(Color.WhiteSmoke)
};
Pattern 3: Custom Border with 3D Effect
Apply custom 3D border to a panel:
// Create panel with 3D raised border
var borderedPanel = new StatusBarAdvPanel
{
Text = "Status: Ready",
Size = new Size(150, 30),
BorderStyle = BorderStyle.Fixed3D,
Border3DStyle = Border3DStyle.RaisedInner,
BorderSides = Border3DSide.All,
Alignment = HorizontalAlignment.Center,
BackgroundColor = new BrushInfo(
GradientStyle.Horizontal,
Color.LavenderBlush,
Color.RosyBrown
)
};
Key Properties
StatusBarAdvPanel Properties
| Property |
Type |
Description |
| PanelType |
StatusBarAdvPanelType |
Type of panel (Custom, NumLockState, CapsLockState, ScrollLockState, InsertKeyState, ShortDate, LongDate, ShortTime, LongTime, CurrentCulture) |
| Text |
string |
Text displayed in the panel (for Custom panel type) |
| BackgroundColor |
BrushInfo |
Background gradient, pattern, or solid color |
| Icon |
Icon |
Icon displayed in the panel |
| Alignment |
HorizontalAlignment |
Alignment of text and icon (Left, Right, Center) |
| HAlign |
HorzFlowAlign |
Horizontal alignment in flow layout (Left, Right, Center, Justify) |
| IsMarquee |
bool |
Enables marquee-style text animation |
| AnimationStyle |
MarqueeStyle |
Animation style (Scroll, Slide, Alternate) |
| AnimationDirection |
MarqueeDirection |
Animation direction (Left, Right) |
| AnimationSpeed |
int |
Speed of marquee animation |
| AnimationDelay |
int |
Delay before animation starts |
| BorderStyle |
BorderStyle |
Border style (None, FixedSingle, Fixed3D) |
| Border3DStyle |
Border3DStyle |
3D border style (10 options) |
| BorderColor |
Color |
Color of 2D border |
| BorderSingle |
ButtonBorderStyle |
2D border style (Solid, Dashed, Dotted, etc.) |
| BorderSides |
Border3DSide |
Border sides to display (All, Top, Bottom, Left, Right, Middle) |
| SizeToContent |
bool |
Auto-resize panel based on content |
| PreferredSize |
Size |
Preferred size in flow layout |
| ThemesEnabled |
bool |
Enables themed appearance |
| IgnoreThemeBackground |
bool |
Ignores theme background color |
| ToolTip |
string |
Tooltip text for the panel |
Common Use Cases
- Application Status Display: Show current application state with custom text and styling
- Keyboard State Indicators: Display NumLock, CapsLock, ScrollLock, and Insert key states
- Date/Time Information: Show current date and time in various formats
- Culture Information: Display current culture settings
- Marquee Announcements: Scrolling text for announcements or updates
- Progress Indicators: Custom panels with text indicating processing status
- Document Information: Show document-related information (line number, position, etc.)
- Themed Status Panels: Match application theme with coordinated panel styling
Additional Resources
For more information about StatusBarAdvPanel:
- Use within StatusBarAdv control for enhanced status bars
- Combine multiple panels with different types for comprehensive status displays
- Leverage events for dynamic panel updates based on application state
- Apply consistent theming across all panels for professional appearance
1---2name: syncfusion-winforms-statusbaradv-panel3description: Guide for implementing Syncfusion StatusBarAdvPanel control in Windows Forms applications. Use when creating custom status bar panels with marquee text animation, key state indicators, date time displays, or culture information panels. Covers panel types, appearance styling, gradients, marquee animation, alignment, borders, themes, and event handling for enhanced status bar panel displays.4---56# Implementing Status Bar Panels (StatusBarAdvPanel)78This skill guides the implementation of the Syncfusion StatusBarAdvPanel control in Windows Forms applications. StatusBarAdvPanel is a panel-derived class that displays status bar information with enhanced appearance, marquee animation, and can be used both within StatusBarAdv controls and standalone on forms.910## When to Use This Skill1112Use this skill when you need to:13- Create individual status bar panels with custom content and styling14- Display key state indicators (NumLock, CapsLock, ScrollLock, Insert key)15- Show date/time information in various formats (short date, long date, short time, long time)16- Display culture information (CurrentCulture) in status bars17- Implement marquee text animation with scrolling, sliding, or alternating effects18- Apply gradient backgrounds or patterns to status bar panels19- Configure panel alignment within StatusBarAdv or flow layouts20- Add custom borders (2D or 3D) to individual panels21- Handle property change events for dynamic panel updates22- Create themed status bar panels matching application design2324## Component Overview2526**StatusBarAdvPanel** is a versatile panel control designed for status bars with:27- **Panel Types**: Predefined types for key states, date/time, culture, or custom text28- **Marquee Animation**: Scrolling text with customizable speed, direction, and style29- **Enhanced Backgrounds**: Gradient, pattern, and solid color options using BrushInfo30- **Icon Support**: Display icons alongside panel text31- **Alignment Options**: Content alignment (Left, Right, Center) and flow alignment (including Justify)32- **Border Customization**: 2D and 3D border styles with custom colors33- **Auto-Sizing**: Automatic resizing based on content (SizeToContent)34- **Theme Support**: ThemesEnabled and IgnoreThemeBackground properties35- **ToolTip Support**: Add tooltips to provide additional information36- **18 Property Events**: Comprehensive event handling for property changes3738**Assembly:** Syncfusion.Tools.Windows 39**Dependencies:** Syncfusion.Shared.Base, Syncfusion.Tools.Windows 40**Namespace:** `Syncfusion.Windows.Forms.Tools`4142## Documentation and Navigation Guide4344### Getting Started45📄 **Read:** [references/getting-started.md](references/getting-started.md)4647**When to read:** First time implementing StatusBarAdvPanel, setting up assemblies, or creating basic panels.4849- Assembly requirements and installation50- Designer-based setup with drag-and-drop51- Programmatic creation and initialization52- Adding panels to StatusBarAdv or forms53- Basic configuration (Location, Size, BackgroundColor)54- PanelType and BorderColor setup55- Troubleshooting common setup issues5657### Panel Types and Behavior58📄 **Read:** [references/panel-types-and-behavior.md](references/panel-types-and-behavior.md)5960**When to read:** Configuring panel types, displaying key states or date/time, or customizing panel sizing.6162- PanelType property options (key states, date/time, culture, custom)63- Key state indicators (NumLock, CapsLock, ScrollLock, InsertKey)64- Date/time formats (ShortDate, LongDate, ShortTime, LongTime)65- Custom text panels with Text property66- GetText() method for key state text retrieval67- SizeToContent for automatic panel resizing68- PreferredSize property configuration6970### Appearance and Styling71📄 **Read:** [references/appearance-styling.md](references/appearance-styling.md)7273**When to read:** Customizing panel appearance, applying gradients, setting background colors, or adding icons.7475- BackgroundColor property with BrushInfo76- Gradient styles (6 types: ForwardDiagonal, BackwardDiagonal, Horizontal, Vertical, PathRectangle, PathEllipse)77- Pattern styles (Cross, DiagonalCross, DottedGrid, LargeGrid, Wave)78- GradientBackground and GradientColors configuration79- BackColor and ForeColor customization80- Icon property for panel icons81- Complete styling examples8283### Text and Marquee Animation84📄 **Read:** [references/text-and-marquee.md](references/text-and-marquee.md)8586**When to read:** Implementing marquee text animation, configuring scrolling effects, or controlling animation behavior.8788- Text property configuration89- IsMarquee property for enabling animation90- AnimationDelay for timing control91- AnimationDirection (Left/Right)92- AnimationSpeed customization93- AnimationStyle (Scroll, Slide, Alternate)94- StartAnimation() and StopAnimation() methods95- Complete marquee examples9697### Alignment and Borders98📄 **Read:** [references/alignment-and-borders.md](references/alignment-and-borders.md)99100**When to read:** Configuring panel alignment, customizing borders, or setting up flow layout positioning.101102- Alignment property (Left, Right, Center)103- HAlign property for flow layout (Left, Right, Center, Justify)104- BorderStyle property (None, FixedSingle, Fixed3D)105- Border3DStyle options (10 styles)106- BorderColor for 2D borders107- BorderSingle styles (Solid, Dashed, Dotted, Inset, Outset, None)108- BorderSides configuration (Left, Top, Right, Bottom, Middle, All)109- 2D vs 3D border examples110111### Themes, ToolTips, and Events112📄 **Read:** [references/themes-tooltips-events.md](references/themes-tooltips-events.md)113114**When to read:** Implementing themes, adding tooltips, or handling property change events.115116- ThemesEnabled property117- IgnoreThemeBackground property118- ToolTip property configuration119- 18 property change events120- Event subscription examples121- Event handling patterns122- Complete event monitoring example123124## Quick Start Example125126### Basic StatusBarAdvPanel with Gradient Background127128**C#:**129```csharp130using Syncfusion.Windows.Forms.Tools;131using Syncfusion.Drawing;132using System.Drawing;133using System.Windows.Forms;134135public partial class MainForm : Form136{137 private StatusBarAdvPanel statusBarAdvPanel1;138 139 public MainForm()140 {141 InitializeComponent();142 SetupStatusBarPanel();143 }144 145 private void SetupStatusBarPanel()146 {147 // Create StatusBarAdvPanel148 statusBarAdvPanel1 = new StatusBarAdvPanel149 {150 // Set panel location and size151 Location = new Point(160, 184),152 Size = new Size(216, 48),153 154 // Configure panel type to show long date155 PanelType = StatusBarAdvPanelType.LongDate,156 157 // Apply gradient background158 BackgroundColor = new BrushInfo(159 GradientStyle.BackwardDiagonal, 160 Color.PaleVioletRed, 161 Color.PeachPuff162 ),163 164 // Set border and alignment165 BorderColor = Color.Black,166 HAlign = HorzFlowAlign.Left167 };168 169 // Add to form170 this.Controls.Add(statusBarAdvPanel1);171 }172}173```174175**VB.NET:**176```vb177Imports Syncfusion.Windows.Forms.Tools178Imports Syncfusion.Drawing179Imports System.Drawing180Imports System.Windows.Forms181182Public Partial Class MainForm183 Inherits Form184 185 Private statusBarAdvPanel1 As StatusBarAdvPanel186 187 Public Sub New()188 InitializeComponent()189 SetupStatusBarPanel()190 End Sub191 192 Private Sub SetupStatusBarPanel()193 ' Create StatusBarAdvPanel194 statusBarAdvPanel1 = New StatusBarAdvPanel With {195 .Location = New Point(160, 184),196 .Size = New Size(216, 48),197 .PanelType = StatusBarAdvPanelType.LongDate,198 .BackgroundColor = New BrushInfo(199 GradientStyle.BackwardDiagonal, 200 Color.PaleVioletRed, 201 Color.PeachPuff202 ),203 .BorderColor = Color.Black,204 .HAlign = HorzFlowAlign.Left205 }206 207 ' Add to form208 Me.Controls.Add(statusBarAdvPanel1)209 End Sub210End Class211```212213## Common Patterns214215### Pattern 1: Marquee Panel with Scrolling Text216217Create an animated status panel with marquee scrolling text:218219```csharp220// Configure marquee panel221var marqueePanel = new StatusBarAdvPanel222{223 Text = "Welcome to our application! Latest updates available...",224 IsMarquee = true,225 AnimationStyle = MarqueeStyle.Scroll,226 AnimationDirection = MarqueeDirection.Left,227 AnimationSpeed = 5,228 AnimationDelay = 10,229 Size = new Size(300, 30),230 BackColor = Color.LightBlue231};232233// Start animation on form load234marqueePanel.StartAnimation();235236// Stop animation when needed237// marqueePanel.StopAnimation();238```239240### Pattern 2: Key State Indicator Panels241242Create panels displaying keyboard key states:243244```csharp245// NumLock indicator246var numLockPanel = new StatusBarAdvPanel247{248 PanelType = StatusBarAdvPanelType.NumLockState,249 Size = new Size(80, 24),250 HAlign = HorzFlowAlign.Right,251 BackgroundColor = new BrushInfo(Color.WhiteSmoke)252};253254// CapsLock indicator255var capsLockPanel = new StatusBarAdvPanel256{257 PanelType = StatusBarAdvPanelType.CapsLockState,258 Size = new Size(80, 24),259 HAlign = HorzFlowAlign.Right,260 BackgroundColor = new BrushInfo(Color.WhiteSmoke)261};262263// InsertKey indicator264var insertKeyPanel = new StatusBarAdvPanel265{266 PanelType = StatusBarAdvPanelType.InsertKeyState,267 Size = new Size(80, 24),268 HAlign = HorzFlowAlign.Right,269 BackgroundColor = new BrushInfo(Color.WhiteSmoke)270};271```272273### Pattern 3: Custom Border with 3D Effect274275Apply custom 3D border to a panel:276277```csharp278// Create panel with 3D raised border279var borderedPanel = new StatusBarAdvPanel280{281 Text = "Status: Ready",282 Size = new Size(150, 30),283 BorderStyle = BorderStyle.Fixed3D,284 Border3DStyle = Border3DStyle.RaisedInner,285 BorderSides = Border3DSide.All,286 Alignment = HorizontalAlignment.Center,287 BackgroundColor = new BrushInfo(288 GradientStyle.Horizontal,289 Color.LavenderBlush,290 Color.RosyBrown291 )292};293```294295## Key Properties296297### StatusBarAdvPanel Properties298299| Property | Type | Description |300|----------|------|-------------|301| **PanelType** | StatusBarAdvPanelType | Type of panel (Custom, NumLockState, CapsLockState, ScrollLockState, InsertKeyState, ShortDate, LongDate, ShortTime, LongTime, CurrentCulture) |302| **Text** | string | Text displayed in the panel (for Custom panel type) |303| **BackgroundColor** | BrushInfo | Background gradient, pattern, or solid color |304| **Icon** | Icon | Icon displayed in the panel |305| **Alignment** | HorizontalAlignment | Alignment of text and icon (Left, Right, Center) |306| **HAlign** | HorzFlowAlign | Horizontal alignment in flow layout (Left, Right, Center, Justify) |307| **IsMarquee** | bool | Enables marquee-style text animation |308| **AnimationStyle** | MarqueeStyle | Animation style (Scroll, Slide, Alternate) |309| **AnimationDirection** | MarqueeDirection | Animation direction (Left, Right) |310| **AnimationSpeed** | int | Speed of marquee animation |311| **AnimationDelay** | int | Delay before animation starts |312| **BorderStyle** | BorderStyle | Border style (None, FixedSingle, Fixed3D) |313| **Border3DStyle** | Border3DStyle | 3D border style (10 options) |314| **BorderColor** | Color | Color of 2D border |315| **BorderSingle** | ButtonBorderStyle | 2D border style (Solid, Dashed, Dotted, etc.) |316| **BorderSides** | Border3DSide | Border sides to display (All, Top, Bottom, Left, Right, Middle) |317| **SizeToContent** | bool | Auto-resize panel based on content |318| **PreferredSize** | Size | Preferred size in flow layout |319| **ThemesEnabled** | bool | Enables themed appearance |320| **IgnoreThemeBackground** | bool | Ignores theme background color |321| **ToolTip** | string | Tooltip text for the panel |322323## Common Use Cases3243251. **Application Status Display**: Show current application state with custom text and styling3262. **Keyboard State Indicators**: Display NumLock, CapsLock, ScrollLock, and Insert key states3273. **Date/Time Information**: Show current date and time in various formats3284. **Culture Information**: Display current culture settings3295. **Marquee Announcements**: Scrolling text for announcements or updates3306. **Progress Indicators**: Custom panels with text indicating processing status3317. **Document Information**: Show document-related information (line number, position, etc.)3328. **Themed Status Panels**: Match application theme with coordinated panel styling333334## Additional Resources335336For more information about StatusBarAdvPanel:337- Use within StatusBarAdv control for enhanced status bars338- Combine multiple panels with different types for comprehensive status displays339- Leverage events for dynamic panel updates based on application state340- Apply consistent theming across all panels for professional appearance