![]() | Type | Description | ||
| OldItem as Item | An Item object that's un-highlighted. | |||
| NewItem as Item | An Item object that's highlighted. |
Use the HighLightItem event to notify your application that an item is highlighted. The HighLightItem event occurs when cursor hovers the item. The HighlightItemType property specifies the way how the control marks the highlighted item. Use the ForeColor property to specify the item's foreground color.
The following VB sample bolds the highlighted item:
Private Sub ListBar1_HighLightItem(ByVal OldItem As EXLISTBARLibCtl.IItem, ByVal NewItem As EXLISTBARLibCtl.IItem)
If Not OldItem Is Nothing Then
OldItem.Bold = False
End If
If Not NewItem Is Nothing Then
NewItem.Bold = True
End If
End Sub
The following C++ sample bolds the highlighted item:
void OnHighLightItemListbar1(LPDISPATCH OldItem, LPDISPATCH NewItem)
{
CItem oldItem( OldItem ); oldItem.m_bAutoRelease = FALSE;
CItem newItem( NewItem ); newItem.m_bAutoRelease = FALSE;
if ( oldItem.m_lpDispatch != NULL )
oldItem.SetBold( FALSE );
if ( newItem.m_lpDispatch != NULL )
newItem.SetBold( TRUE );
}
The following VB.NET sample bolds the highlighted item:
Private Sub AxListBar1_HighLightItem(ByVal sender As Object, ByVal e As AxEXLISTBARLib._IListBarEvents_HighLightItemEvent) Handles AxListBar1.HighLightItem
If Not e.oldItem Is Nothing Then
e.oldItem.Bold = False
End If
If Not e.newItem Is Nothing Then
e.newItem.Bold = True
End If
End Sub
The following C# sample bolds the highlighted item:
private void axListBar1_HighLightItem(object sender, AxEXLISTBARLib._IListBarEvents_HighLightItemEvent e)
{
if (e.oldItem != null)
e.oldItem.Bold = false;
if (e.newItem != null)
e.newItem.Bold = true;
}
The following VFP sample bolds the highlighted item:
*** ActiveX Control Event ***
LPARAMETERS olditem, newitem
If !isnull(OldItem)
OldItem.Bold = .f.
EndIf
If !isnull(NewItem)
NewItem.Bold = .t.
EndIf