Name
StatusBarPanel
Synopsis
This class represents a single panel within a
StatusBar. It can display Text
and/or an Icon. Unlike other controls in the
framework, this Icon really must be an
Icon and not a generic Image.
You can choose the Alignment of the text and icons
within the panel, which honors the right-to-left reading status of
the parent control (unlike the general layout of the status bar
itself).
You can specify a standard Width for the panel as
well as its MinWidth. Alternatively, you can set
the AutoSize style to size to the
Contents or Spring (which will
evenly divide up the remaining space in the
StatusBar).
The border around the panel is set with the
BorderStyle property, and you can assign a ToolTip
with the ToolTipText.
If you want to handle the repaint for the panel yourself (for
example, creating a progress indicator panel), you can set the
Style property to
StatusBarPanelStyle.OwnerDraw.
If the user clicks on a panel, the StatusBar
raises a PanelClick event. See
StatusBarPanelClickEventArgs for more information.
public class StatusBarPanel : System.ComponentModel.Component : System.ComponentModel.ISupportInitialize { // Public Constructors public StatusBarPanel(); // Public Instance Properties public HorizontalAlignment Alignment{set; get; } public StatusBarPanelAutoSize AutoSize{set; get; } public StatusBarPanelBorderStyle BorderStyle{set; get; } public Icon Icon{set; get; } public int MinWidth{set; get; } public StatusBar Parent{get; } public StatusBarPanelStyle ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access