Type | Description | |||
Part as PartEnum | A PartEnum expression or a combination of PartEnum expressions being shown or hidden | |||
Boolean | A boolean expression that indicates whether the part is visible or hidden |
By default, the following parts are shown:
For instance the following VB sample adds two additional buttons to the left/up side of the control:
With ScrollBar1 .VisiblePart(exLeftB1Part Or exLeftB2Part) = True End With
The following VB sample displays a message when the user clicks the exLeftB1Part part of the control:
Private Sub ScrollBar1_ClickPart(ByVal Part As EXSCROLLBARLibCtl.PartEnum) If (Part = exLeftB1Part) Then MsgBox ("Click") End If End Sub
For instance the following VB.NET sample adds two additional buttons to the left/up side of the control:
With AxScrollBar1 .set_VisiblePart(EXSCROLLBARLib.PartEnum.exLeftB1Part Or EXSCROLLBARLib.PartEnum.exLeftB2Part, True) End With
The following VB.NET sample displays a message when the user clicks the exLeftB1Part part of the control:
Private Sub AxScrollBar1_ClickPart(ByVal sender As System.Object, ByVal e As AxEXSCROLLBARLib._IScrollBarEvents_ClickPartEvent) Handles AxScrollBar1.ClickPart If (e.part = EXSCROLLBARLib.PartEnum.exLeftB1Part) Then MsgBox("Click") End If End Sub
For instance the following C++ sample adds two additional buttons to the left/up side of the control:
m_scrollbar.SetVisiblePart( 32768 /*exLeftB1Part*/ | 16384 /*exLeftB2Part*/, TRUE );
The following C++ sample displays a message when the user clicks the exLeftB1Part part of the control:
void OnClickPartScrollbar1(long Part) { if ( Part == 32768 /*exLeftB1Part*/ ) MessageBox( "Click" ); }
For instance the following C# sample adds two additional buttons to the left/up side of the control:
axScrollBar1.set_VisiblePart(EXSCROLLBARLib.PartEnum.exLeftB1Part | EXSCROLLBARLib.PartEnum.exLeftB2Part, true);
The following C# sample displays a message when the user clicks the exLeftB1Part part of the control:
private void axScrollBar1_ClickPart(object sender, AxEXSCROLLBARLib._IScrollBarEvents_ClickPartEvent e) { if (e.part == EXSCROLLBARLib.PartEnum.exLeftB1Part) MessageBox.Show("Click"); }
For instance the following VFP sample adds two additional buttons to the left/up side of the control:
with thisform.ScrollBar1 .VisiblePart(bitor(32768,16384)) = .t. endwith
The following VFP sample displays a message when the user clicks the exLeftB1Part part of the control:
*** ActiveX Control Event *** LPARAMETERS part if ( part = 32768 ) wait window "click" endif