Type | Description | |||
ScrollBar as ScrollBarEnum | A ScrollBar expression that indicates the scrollbar where the part is visible or hidden. | |||
Part as ScrollPartEnum | A ScrollPartEnum expression that specifies the parts of the scroll bar being visible | |||
Boolean | A Boolean expression that specifies whether the scrollbar's part is visible or hidden. |
By default, the following parts are shown:
The following VB sample adds up and down additional buttons to the control's vertical scroll bar :
With G2antt1 .BeginUpdate .ScrollBars = exDisableBoth .ScrollPartVisible(exVScroll, exLeftB1Part Or exRightB1Part) = True .ScrollPartCaption(exVScroll, exLeftB1Part) = "<img></img>1" .ScrollPartCaption(exVScroll, exRightB1Part) = "<img></img>2" .EndUpdate End With
The following VB.NET sample adds up and down additional buttons to the control's vertical scroll bar :
With AxG2antt1 .BeginUpdate() .ScrollBars = EXG2ANTTLib.ScrollBarsEnum.exDisableBoth .set_ScrollPartVisible(EXG2ANTTLib.ScrollBarEnum.exVScroll, EXG2ANTTLib.ScrollPartEnum.exLeftB1Part Or EXG2ANTTLib.ScrollPartEnum.exRightB1Part, True) .set_ScrollPartCaption(EXG2ANTTLib.ScrollBarEnum.exVScroll, EXG2ANTTLib.ScrollPartEnum.exLeftB1Part, "<img></img>1") .set_ScrollPartCaption(EXG2ANTTLib.ScrollBarEnum.exVScroll, EXG2ANTTLib.ScrollPartEnum.exRightB1Part, "<img></img>2") .EndUpdate() End With
The following C# sample adds up and down additional buttons to the control's vertical scroll bar :
axG2antt1.BeginUpdate(); axG2antt1.ScrollBars = EXG2ANTTLib.ScrollBarsEnum.exDisableBoth; axG2antt1.set_ScrollPartVisible(EXG2ANTTLib.ScrollBarEnum.exVScroll, EXG2ANTTLib.ScrollPartEnum.exLeftB1Part | EXG2ANTTLib.ScrollPartEnum.exRightB1Part, true); axG2antt1.set_ScrollPartCaption(EXG2ANTTLib.ScrollBarEnum.exVScroll, EXG2ANTTLib.ScrollPartEnum.exLeftB1Part , "<img></img>1"); axG2antt1.set_ScrollPartCaption(EXG2ANTTLib.ScrollBarEnum.exVScroll, EXG2ANTTLib.ScrollPartEnum.exRightB1Part, "<img></img>2"); axG2antt1.EndUpdate();
The following C++ sample adds up and down additional buttons to the control's vertical scroll bar :
m_g2antt.BeginUpdate(); m_g2antt.SetScrollBars( 15 /*exDisableBoth*/ ); m_g2antt.SetScrollPartVisible( 0 /*exVScroll*/, 32768 /*exLeftB1Part*/ | 32 /*exRightB1Part*/, TRUE ); m_g2antt.SetScrollPartCaption( 0 /*exVScroll*/, 32768 /*exLeftB1Part*/ , _T("<img></img>1") ); m_g2antt.SetScrollPartCaption( 0 /*exVScroll*/, 32 /*exRightB1Part*/ , _T("<img></img>2") ); m_g2antt.EndUpdate();
The following VFP sample adds up and down additional buttons to the control's vertical scroll bar :
With thisform.G2antt1 .BeginUpdate .ScrollBars = 15 .ScrollPartVisible(0, bitor(32768,32)) = .t. .ScrollPartCaption(0,32768) = "<img></img>1" .ScrollPartCaption(0, 32) = "<img></img>2" .EndUpdate EndWith
*** ActiveX Control Event *** LPARAMETERS scrollpart wait window nowait ltrim(str(scrollpart))