property Items.ItemUnderline(Item as HITEM) as Boolean

Retrieves or sets the Underline property of the Font object used to paint the item.

TypeDescription
Item as HITEM A long expression that indicates the item's handle.
Boolean A boolean expression that indicates if the item is underlined or not. True if the item is underlined, False, if the item is not underlined.

Use ItemBold, ItemItalic, ItemUnderline or ItemStrikeOut property to apply different font attributes to the item. Use the CellItalic, CellUnderline, CellBold or CellStrikeOut property to apply different font attributes to the cell. Use the CellValueFormat property to specify an HTML caption. Use the ConditionalFormats method to apply formats to a cell or range of cells, and have that formatting change depending on the value of the cell or the value of a formula.

The following VB sample underlines the selected item:

Private Sub Grid1_SelectionChanged()
    If Not (h = 0) Then Grid1.Items.ItemUnderline(h) = False
    h = Grid1.Items.SelectedItem()
    Grid1.Items.ItemUnderline(h) = True
End Sub

The following VB sample underlines the focused item:

With Grid1.Items
    .ItemUnderline(.FocusItem) = True
End With

The following C++ sample underlines the focused item:

#include "Items.h"
CItems items = m_grid.GetItems();
items.SetItemUnderline( items.GetFocusItem() , TRUE );

The following C# sample underlines the focused item:

axGrid1.Items.set_ItemUnderline(axGrid1.Items.FocusItem, true);

The following VB.NET sample underlines the focused item:

With AxGrid1.Items
    .ItemUnderline(.FocusItem) = True
End With

The following VFP sample underlines the focused item:

with thisform.Grid1.Items
	.DefaultItem = .FocusItem
	.ItemUnderline( 0 ) = .t.
endwith