![]() | Type | Description | ||
| ScrollBar as ScrollBarEnum | A ScrollBarEnum expression that specifies the scrollbar 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 ComboBox1
.BeginUpdate
.ScrollPartVisible(exVScroll, exLeftB1Part Or exRightB1Part) = True
.ScrollPartCaption(exVScroll, exLeftB1Part) = "<img></img>1"
.ScrollPartCaption(exVScroll, exRightB1Part) = "<img></img>2"
.EndUpdate
End With
Private Sub ComboBox1_ScrollButtonClick(ByVal ScrollPart As EXCOMBOBOXLibCtl.ScrollPartEnum)
MsgBox (ScrollPart)
End Sub
The following VB.NET sample displays the identifier of the scroll's button being clicked:
With AxComboBox1
.BeginUpdate()
.set_ScrollPartVisible(EXCOMBOBOXLib.ScrollBarEnum.exVScroll, EXCOMBOBOXLib.ScrollPartEnum.exLeftB1Part Or EXCOMBOBOXLib.ScrollPartEnum.exRightB1Part, True)
.set_ScrollPartCaption(EXCOMBOBOXLib.ScrollBarEnum.exVScroll, EXCOMBOBOXLib.ScrollPartEnum.exLeftB1Part, "<img></img>1")
.set_ScrollPartCaption(EXCOMBOBOXLib.ScrollBarEnum.exVScroll, EXCOMBOBOXLib.ScrollPartEnum.exRightB1Part, "<img></img>2")
.EndUpdate()
End With
Private Sub AxComboBox1_ScrollButtonClick(ByVal sender As System.Object, ByVal e As AxEXCOMBOBOXLib._IComboBoxEvents_ScrollButtonClickEvent) Handles AxComboBox1.ScrollButtonClick
MessageBox.Show( e.scrollPart.ToString())
End Sub
The following C# sample displays the identifier of the scroll's button being clicked:
axComboBox1.BeginUpdate(); axComboBox1.set_ScrollPartVisible(EXCOMBOBOXLib.ScrollBarEnum.exVScroll, EXCOMBOBOXLib.ScrollPartEnum.exLeftB1Part | EXCOMBOBOXLib.ScrollPartEnum.exRightB1Part, true); axComboBox1.set_ScrollPartCaption(EXCOMBOBOXLib.ScrollBarEnum.exVScroll, EXCOMBOBOXLib.ScrollPartEnum.exLeftB1Part , "<img></img>1"); axComboBox1.set_ScrollPartCaption(EXCOMBOBOXLib.ScrollBarEnum.exVScroll, EXCOMBOBOXLib.ScrollPartEnum.exRightB1Part, "<img></img>2"); axComboBox1.EndUpdate();
private void axComboBox1_ScrollButtonClick(object sender, AxEXCOMBOBOXLib._IComboBoxEvents_ScrollButtonClickEvent e)
{
MessageBox.Show(e.scrollPart.ToString());
}
The following C++ sample displays the identifier of the scroll's button being clicked:
m_comboBox.BeginUpdate();
m_comboBox.SetScrollPartVisible( 0 /*exVScroll*/, 32768 /*exLeftB1Part*/ | 32 /*exRightB1Part*/, TRUE );
m_comboBox.SetScrollPartCaption( 0 /*exVScroll*/, 32768 /*exLeftB1Part*/ , _T("<img></img>1") );
m_comboBox.SetScrollPartCaption( 0 /*exVScroll*/, 32 /*exRightB1Part*/ , _T("<img></img>2") );
m_comboBox.EndUpdate();
void OnScrollButtonClickComboBox1(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.ComboBox1
.BeginUpdate
.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))