![]() | Type | Description | ||
| ScrollBar as ScrollBarEnum | A ScrollBarEnum expression that specifies the scroll bar being clicked. | |||
| ScrollPart as ScrollPartEnum | A ScrollPartEnum expression that indicates the part of the scroll being clicked. |
The following VB sample displays the identifier of the scroll's button being clicked:
With Gantt1
.BeginUpdate
.ScrollBars = exDisableBoth
.ScrollPartVisible(exVScroll, exLeftB1Part Or exRightB1Part) = True
.ScrollPartCaption(exVScroll, exLeftB1Part) = "<img></img>1"
.ScrollPartCaption(exVScroll, exRightB1Part) = "<img></img>2"
.EndUpdate
End With
Private Sub Gantt1_ScrollButtonClick(ByVal ScrollPart As EXGANTTLibCtl.ScrollPartEnum)
MsgBox (ScrollPart)
End Sub
The following VB.NET sample displays the identifier of the scroll's button being clicked:
With AxGantt1
.BeginUpdate()
.ScrollBars = EXGANTTLib.ScrollBarsEnum.exDisableBoth
.set_ScrollPartVisible(EXGANTTLib.ScrollBarEnum.exVScroll, EXGANTTLib.ScrollPartEnum.exLeftB1Part Or EXGANTTLib.ScrollPartEnum.exRightB1Part, True)
.set_ScrollPartCaption(EXGANTTLib.ScrollBarEnum.exVScroll, EXGANTTLib.ScrollPartEnum.exLeftB1Part, "<img></img>1")
.set_ScrollPartCaption(EXGANTTLib.ScrollBarEnum.exVScroll, EXGANTTLib.ScrollPartEnum.exRightB1Part, "<img></img>2")
.EndUpdate()
End With
Private Sub AxGantt1_ScrollButtonClick(ByVal sender As System.Object, ByVal e As AxEXGANTTLib._IGanttEvents_ScrollButtonClickEvent) Handles AxGantt1.ScrollButtonClick
MessageBox.Show( e.scrollPart.ToString())
End Sub
The following C# sample displays the identifier of the scroll's button being clicked:
axGantt1.BeginUpdate(); axGantt1.ScrollBars = EXGANTTLib.ScrollBarsEnum.exDisableBoth; axGantt1.set_ScrollPartVisible(EXGANTTLib.ScrollBarEnum.exVScroll, EXGANTTLib.ScrollPartEnum.exLeftB1Part | EXGANTTLib.ScrollPartEnum.exRightB1Part, true); axGantt1.set_ScrollPartCaption(EXGANTTLib.ScrollBarEnum.exVScroll, EXGANTTLib.ScrollPartEnum.exLeftB1Part , "<img></img>1"); axGantt1.set_ScrollPartCaption(EXGANTTLib.ScrollBarEnum.exVScroll, EXGANTTLib.ScrollPartEnum.exRightB1Part, "<img></img>2"); axGantt1.EndUpdate();
private void axGantt1_ScrollButtonClick(object sender, AxEXGANTTLib._IGanttEvents_ScrollButtonClickEvent e)
{
MessageBox.Show(e.scrollPart.ToString());
}
The following C++ sample displays the identifier of the scroll's button being clicked:
m_gantt.BeginUpdate();
m_gantt.SetScrollBars( 15 /*exDisableBoth*/ );
m_gantt.SetScrollPartVisible( 0 /*exVScroll*/, 32768 /*exLeftB1Part*/ | 32 /*exRightB1Part*/, TRUE );
m_gantt.SetScrollPartCaption( 0 /*exVScroll*/, 32768 /*exLeftB1Part*/ , _T("<img></img>1") );
m_gantt.SetScrollPartCaption( 0 /*exVScroll*/, 32 /*exRightB1Part*/ , _T("<img></img>2") );
m_gantt.EndUpdate();
void OnScrollButtonClickGantt1(long ScrollPart)
{
CString strFormat;
strFormat.Format( _T("%i"), ScrollPart );
MessageBox( strFormat );
}
The following VFP sample displays the identifier of the scroll's button being clicked:
With thisform.Gantt1
.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))