DrawListViewSubItemEventArgs::DrawText Method ()


The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Draws the text of the ListViewItem::ListViewSubItem using its current foreground color.

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

void DrawText()

Use this method to draw the subitem text using the current values of the ListViewItem::ListViewSubItem::ForeColor and ListViewItem::ListViewSubItem::Font properties. The text is drawn within the area specified by the Bounds property.


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

.NET Framework
Available since 2.0
Return to top