property G2antt.ScrollToolTip(ScrollBar as ScrollBarEnum) as String
Specifies the tooltip being shown when the user moves the scroll box.

 TypeDescription 
   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.  
Use the ScrollToolTip property to specify whether the control displays a tooltip when the user clicks and moves the scrollbar's thumb. By default, the ScrollToolTip property is empty. If the ScrollToolTip property is empty, the tooltip is not shown when the user clicks and moves the thumb of the scroll bar. The OffsetChanged event notifies your application that the user changes the scroll position. Use the SortPartVisible property to specify the parts being visible in the control's scroll bar. Use the ScrollBars property to specify the visible scrollbars in the control.

The following VB sample displays a tooltip when the user clicks and moves the thumb in the control's scroll bar:

Private Sub G2antt1_OffsetChanged(ByVal Horizontal As Boolean, ByVal NewVal As Long)
    If (Not Horizontal) Then
        G2antt1.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 AxG2antt1_OffsetChanged(ByVal sender As System.Object, ByVal e As AxEXG2ANTTLib._IG2anttEvents_OffsetChangedEvent) Handles AxG2antt1.OffsetChanged
    If (Not e.horizontal) Then
        AxG2antt1.set_ScrollToolTip(EXG2ANTTLib.ScrollBarEnum.exVScroll, "Record " & e.newVal.ToString())
    End If
End Sub

The following C++ sample displays a tooltip when the user clicks and moves the thumb in the control's scroll bar:

void OnOffsetChangedG2antt1(BOOL Horizontal, long NewVal) 
{
	if ( !Horizontal )
	{
		CString strFormat;
		strFormat.Format( _T("%i"), NewVal );
		m_g2antt.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 axG2antt1_OffsetChanged(object sender, AxEXG2ANTTLib._IG2anttEvents_OffsetChangedEvent e)
{
    if ( !e.horizontal )
        axG2antt1.set_ScrollToolTip(EXG2ANTTLib.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.G2antt1.ScrollToolTip(0) = "Record " + ltrim(str(newval))
EndIf

Send comments on this topic.
1999-2017 Exontrol.COM, Software. All rights reserved.