This documentation is archived and is not being maintained.

StatusBarPanel.Style Property

Gets or sets the style of the status bar panel.

[Visual Basic]
Public Property Style As StatusBarPanelStyle
public StatusBarPanelStyle Style {get; set;}
public: __property StatusBarPanelStyle get_Style();
public: __property void set_Style(StatusBarPanelStyle);
public function get Style() : StatusBarPanelStyle;
public function set Style(StatusBarPanelStyle);

Property Value

One of the StatusBarPanelStyle values. The default is StatusBarPanelStyle.Text.


Exception Type Condition
InvalidEnumArgumentException The value assigned to the property is not a member of the StatusBarPanelStyle enumeration.


You can use this property to indicate whether a StatusBarPanel displays text or whether the panel is managed as an owner-drawn StatusBarPanel. To determine when a StatusBarPanel object needs to be drawn, create an event handler for the DrawItem event of the StatusBar control. The StatusBarDrawItemEventArgs object passed as a parameter to an event handler of the DrawItem event enables you to determine which panel needs to be drawn. The StatusBarDrawItemEventArgs also provides a Graphics object you can use to perform drawing tasks on the StatusBarPanel.


Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

StatusBarPanel Class | StatusBarPanel Members | System.Windows.Forms Namespace | StatusBarPanelStyle