Type | Description | |||
String | A String expression that specifies the title of the tooltip being displayed when the user clicks and moves the control's thumb. |
The following VB sample displays a tooltip when user moves the thumb:
Private Sub ScrollBar1_Change() With ScrollBar1 .Object.ToolTipText = "Record " & .Value & "/" & .Maximum .ToolTipTitle = "Position" End With End Sub
The following VB/NET sample displays a tooltip when user moves the thumb:
Private Sub AxScrollBar1_Change(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AxScrollBar1.Change With AxScrollBar1 .ToolTipText = "Record " & .Value.ToString() & "/" & .Maximum.ToString() .ToolTipTitle = "Position" End With End Sub
The following C# sample displays a tooltip when user moves the thumb:
private void axScrollBar1_Change(object sender, EventArgs e) { axScrollBar1.ToolTipText = "Record " + axScrollBar1.Value.ToString() + "/" + axScrollBar1.Maximum.ToString(); axScrollBar1.ToolTipTitle = "Position"; }
The following C++ sample displays a tooltip when user moves the thumb:
void OnChangeScrollbar1() { CString strFormat; strFormat.Format( _T("Record %i/%i"), m_scrollbar.GetValue(), m_scrollbar.GetMaximum() ); m_scrollbar.SetToolTipText( strFormat ); m_scrollbar.SetToolTipTitle( "Position" ); }
The following VFP sample displays a tooltip when user moves the thumb:
*** ActiveX Control Event *** with thisform.ScrollBar1 .Object.ToolTipText = "Record " + ltrim(str(.Value)) + "/" + ltrim(str(.Maximum)) .ToolTipTitle = "Position" endwith