Type | Description | |||
Value as Variant | A long expression that indicates the value of the item whose tooltip is accessed, a string expression that indicates the caption of the item whose tooltip is accessed. | |||
String | A string expression that may include HTML tags, that indicates the text being displayed when the mouse hovers the item. |
The following VB sample adds a predefined value that displays a tooltip when the cursor hovers the value in the drop down portion of the editor:
With Grid1.Columns(0).Editor .EditType = DropDownListType .AddItem 1, "Root Item" .ItemToolTip(1) = "This is a bit of text that should appear when the cursor <b>hovers</b> the item." .InsertItem 2, "Child Item", , 1 End With
The following C++ sample adds a predefined value that displays a tooltip when the cursor hovers the value in the drop down portion of the editor:
#include "Items.h" #include "Editor.h" COleVariant vtMissing; V_VT( &vtMissing) = VT_ERROR; CItems items = m_grid.GetItems(); CEditor editor = items.GetCellEditor( COleVariant( items.GetFirstVisibleItem() ), COleVariant( long(0) ) ); editor.SetEditType( 3 /*DropDownListType*/ ); editor.AddItem( 0, "tooltip", vtMissing ); editor.SetItemToolTip( COleVariant( "tooltip" ), "This is a bit of text that should appear when cursor hovers the item.");
The following VB.NET sample adds a predefined value that displays a tooltip when the cursor hovers the value in the drop down portion of the editor:
With AxGrid1.Items With .CellEditor(.FirstVisibleItem, 0) .EditType = EXGRIDLib.EditTypeEnum.DropDownListType .AddItem(0, "tooltip") .ItemToolTip(0) = "This is a bit of text that should appear when cursor hovers the item." End With End With
The following C# sample adds a predefined value that displays a tooltip when the cursor hovers the value in the drop down portion of the editor:
EXGRIDLib.Items items = axGrid1.Items; EXGRIDLib.Editor editor = items.get_CellEditor(items.FirstVisibleItem, 0); editor.EditType = EXGRIDLib.EditTypeEnum.DropDownListType; editor.AddItem(0, "tooltip", null); editor.set_ItemToolTip(0, "This is a bit of text that should appear when cursor hovers the item.");
The following VFP sample adds a predefined value that displays a tooltip when the cursor hovers the value in the drop down portion of the editor:
with thisform.Grid1.Items With .CellEditor(.FirstVisibleItem, 0) .EditType = 3 && DropDownListType .AddItem(0, "tooltip") .ItemToolTip(0) = "This is a bit of text that should appear when cursor hovers the item." EndWith endwith