System.Windows.Forms.TabRenderer.DrawTabItem Method

Draws a tab in the specified state and bounds; with the specified text, text formatting, and image; and with an optional focus rectangle.

Syntax

public static void DrawTabItem (System.Drawing.Graphics g, System.Drawing.Rectangle bounds, string tabItemText, System.Drawing.Font font, TextFormatFlags flags, System.Drawing.Image image, System.Drawing.Rectangle imageRectangle, bool focused, System.Windows.Forms.VisualStyles.TabItemState state)

Parameters

g
The System.Drawing.Graphics used to draw the tab.
bounds
The System.Drawing.Rectangle that specifies the bounds of the tab.
tabItemText
The string to draw in the tab.
font
The System.Drawing.Font to apply to tabItemText.
flags
A bitwise combination of the System.Windows.Forms.TextFormatFlags values.
image
The System.Drawing.Image to draw in the tab.
imageRectangle
The System.Drawing.Rectangle that specifies the bounds of image.
focused
true to draw a focus rectangle; otherwise, false.
state
One of the System.Windows.Forms.VisualStyles.TabItemState values that specifies the visual state of the tab.

Remarks

Before calling this method, you should verify that the TabRenderer.IsSupported property returns true.

Requirements

Namespace: System.Windows.Forms
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
Assembly Versions: 2.0.0.0
Since: .NET 2.0