System.Windows.Forms.DrawListViewSubItemEventArgs.DrawText Method

Draws the text of the System.Windows.Forms.ListViewItem.ListViewSubItem using its current foreground color and formatting it with the specified System.Windows.Forms.TextFormatFlags values.

Syntax

public void DrawText (TextFormatFlags flags)

Parameters

flags
A bitwise combination of System.Windows.Forms.TextFormatFlags values.

Remarks

Use this method to draw the subitem text using the current values of the System.Windows.Forms.ListViewItem.ListViewSubItem.ForeColor and System.Windows.Forms.ListViewItem.ListViewSubItem.Font properties. The text is drawn within the area specified by the DrawListViewItemEventArgs.Bounds property. The System.Windows.Forms.TextFormatFlags values specified in the flags parameter let you provide formatting properties for the node label, such as text alignment.

Note:

The ListViewItem.UseItemStyleForSubItems property of the parent System.Windows.Forms.ListViewItem must be set to false to prevent the ListViewItem.ForeColor and ListViewItem.Font values of the parent item from overriding the subitem values.

Requirements

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