Type | Description | |||
Part as PartEnum | A PartEnum expression that specifies the part where the text is displayed. | |||
String | A String expression that indicates the text being displayed. The Caption property support built-in HTML format as explained bellow. |
The Caption property supports the following built-in HTML tags:
For instance, the following VB sample prints the control's Value on the control's thumb:
Private Sub ScrollBar1_Change() With ScrollBar1 .Caption(exThumbPart) = .Value End With End Sub
The following C++ sample prints the control's Value on the control's thumb:
void OnChangeScrollbar1() { CString strFormat; strFormat.Format( _T("%i"), m_scrollbar.GetValue() ); m_scrollbar.SetCaption( 256, strFormat ); }
The following VB.NET sample prints the control's Value on the control's thumb:
With AxScrollBar1 .set_Caption(EXSCROLLBARLib.PartEnum.exThumbPart, .Value.ToString()) End With
The following C# sample prints the control's Value on the control's thumb:
private void axScrollBar1_Change(object sender, EventArgs e) { axScrollBar1.set_Caption(EXSCROLLBARLib.PartEnum.exThumbPart, axScrollBar1.Value.ToString()); }
The following VFP sample prints the control's Value on the control's thumb:
*** ActiveX Control Event *** with thisform.ScrollBar1 .Caption(256) = .Value endwith