

| Type | Description | |||
| ScrollBar as ScrollBarEnum | A ScrollBarEnum expression that indicates the vertical scroll bar or the horizontal scroll bar. | |||
| String | A string expression being shown when the user clicks and moves the scrollbar's thumb. |
The following VB sample displays a tooltip when the user clicks and moves the thumb in the control's scroll bar:
Private Sub Tree1_OffsetChanged(ByVal Horizontal As Boolean, ByVal NewVal As Long)
If (Not Horizontal) Then
Tree1.ScrollToolTip(exVScroll) = "Record " & NewVal
End If
End Sub
The following VB.NET sample displays a tooltip when the user clicks and moves the thumb in the control's scroll bar:
Private Sub AxTree1_OffsetChanged(ByVal sender As System.Object, ByVal e As AxEXTREELib._ITreeEvents_OffsetChangedEvent) Handles AxTree1.OffsetChanged
If (Not e.horizontal) Then
AxTree1.set_ScrollToolTip(EXTREELib.ScrollBarEnum.exVScroll, "Record " & e.newVal.ToString())
End If
End SubThe following C++ sample displays a tooltip when the user clicks and moves the thumb in the control's scroll bar:
void OnOffsetChangedTree1(BOOL Horizontal, long NewVal)
{
if ( !Horizontal )
{
CString strFormat;
strFormat.Format( _T("%i"), NewVal );
m_tree.SetScrollToolTip( 0, strFormat );
}
}The following C# sample displays a tooltip when the user clicks and moves the thumb in the control's scroll bar:
private void axTree1_OffsetChanged(object sender, AxEXTREELib._ITreeEvents_OffsetChangedEvent e)
{
if ( !e.horizontal )
axTree1.set_ScrollToolTip(EXTREELib.ScrollBarEnum.exVScroll, "Record " + e.newVal.ToString());
}The following VFP sample displays a tooltip when the user clicks and moves the thumb in the control's scroll bar:
*** ActiveX Control Event ***
LPARAMETERS horizontal, newval
If (1 # horizontal) Then
thisform.Tree1.ScrollToolTip(0) = "Record " + ltrim(str(newval))
EndIf