System.Windows.Forms.TabControl.DrawItem Event

Occurs when the System.Windows.Forms.TabControl needs to paint each of its tabs if the TabControl.DrawMode property is set to TabDrawMode.OwnerDrawFixed.

Syntax

public event DrawItemEventHandler DrawItem

Remarks

When you set the TabControl.DrawMode property to TabDrawMode.OwnerDrawFixed, the System.Windows.Forms.TabControl raises the TabControl.DrawItem event whenever it needs to paint one of its tabs. To customize the appearance of the tabs, provide your own painting code in a handler for the TabControl.DrawItem event.

The System.Windows.Forms.TabControl does not support variable tab sizes with owner drawing.

For more information about handling events, see [<topic://cpconEventsOverview>].

Requirements

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