System.Windows.Forms.StatusBar.DrawItem Event

Occurs when a visual aspect of an owner-drawn status bar control changes.

Syntax

public event StatusBarDrawItemEventHandler DrawItem

Remarks

You can use this event to perform drawing operations in an owner-drawn System.Windows.Forms.StatusBar control. For example, if you display an owner-drawn System.Windows.Forms.StatusBarPanel that displays a progress bar, you can use this event to perform the drawing of the progress bar on the panel. The data provided to the event through the System.Windows.Forms.StatusBarDrawItemEventArgs object passed as a parameter to the event handler enables you to determine the panel that needs to be drawn and the System.Drawing.Graphics to use to draw to the panel. This event is only raised when the StatusBarPanel.Style property of a System.Windows.Forms.StatusBarPanel in a System.Windows.Forms.StatusBar control is set to StatusBarPanelStyle.OwnerDraw.

For more information about handling events, see Consuming Events.

Requirements

Namespace: System.Windows.Forms
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0