event ScrollButtonClick (ScrollBar as ScrollBarEnum, ScrollPart as ScrollPartEnum)
Occurs when the user clicks a button in the scrollbar.

TypeDescription
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.
Use the ScrollButtonClick event to notify your application that the user clicks a button in the control's scrollbar. The ScrollButtonClick event is fired when the user clicks and releases the mouse over an enabled part of the scroll bar. Use the ScrollBars property to specify the visible scrollbars in the control. Use the ScrollPartVisible property to add or remove buttons/parts in the control's scrollbar. Use the ScrollPartEnable property to specify enable or disable parts in the control's scrollbar. Use the ScrolPartCaption property to specify the caption of the scroll's part. Use the Background property to change the visual appearance for any part in the control's scroll bar.

Syntax for ScrollButtonClick event, /NET version, on:

private void ScrollButtonClick(object sender,exontrol.EXSCHEDULELib.ScrollBarEnum ScrollBar,exontrol.EXSCHEDULELib.ScrollPartEnum ScrollPart)
{
}

Private Sub ScrollButtonClick(ByVal sender As System.Object,ByVal ScrollBar As exontrol.EXSCHEDULELib.ScrollBarEnum,ByVal ScrollPart As exontrol.EXSCHEDULELib.ScrollPartEnum) Handles ScrollButtonClick
End Sub

Syntax for ScrollButtonClick event, /COM version, on:

private void ScrollButtonClick(object sender, AxEXSCHEDULELib._IScheduleEvents_ScrollButtonClickEvent e)
{
}

void OnScrollButtonClick(long ScrollBar,long ScrollPart)
{
}

void __fastcall ScrollButtonClick(TObject *Sender,Exschedulelib_tlb::ScrollBarEnum ScrollBar,Exschedulelib_tlb::ScrollPartEnum ScrollPart)
{
}

procedure ScrollButtonClick(ASender: TObject; ScrollBar : ScrollBarEnum;ScrollPart : ScrollPartEnum);
begin
end;

procedure ScrollButtonClick(sender: System.Object; e: AxEXSCHEDULELib._IScheduleEvents_ScrollButtonClickEvent);
begin
end;

begin event ScrollButtonClick(long ScrollBar,long ScrollPart)
end event ScrollButtonClick

Private Sub ScrollButtonClick(ByVal sender As System.Object, ByVal e As AxEXSCHEDULELib._IScheduleEvents_ScrollButtonClickEvent) Handles ScrollButtonClick
End Sub

Private Sub ScrollButtonClick(ByVal ScrollBar As EXSCHEDULELibCtl.ScrollBarEnum,ByVal ScrollPart As EXSCHEDULELibCtl.ScrollPartEnum)
End Sub

Private Sub ScrollButtonClick(ByVal ScrollBar As Long,ByVal ScrollPart As Long)
End Sub

LPARAMETERS ScrollBar,ScrollPart

PROCEDURE OnScrollButtonClick(oSchedule,ScrollBar,ScrollPart)
RETURN

Syntax for ScrollButtonClick event, /COM version (others), on:

<SCRIPT EVENT="ScrollButtonClick(ScrollBar,ScrollPart)" LANGUAGE="JScript">
</SCRIPT>

<SCRIPT LANGUAGE="VBScript">
Function ScrollButtonClick(ScrollBar,ScrollPart)
End Function
</SCRIPT>

Procedure OnComScrollButtonClick OLEScrollBarEnum llScrollBar OLEScrollPartEnum llScrollPart
	Forward Send OnComScrollButtonClick llScrollBar llScrollPart
End_Procedure

METHOD OCX_ScrollButtonClick(ScrollBar,ScrollPart) CLASS MainDialog
RETURN NIL

void onEvent_ScrollButtonClick(int _ScrollBar,int _ScrollPart)
{
}

function ScrollButtonClick as v (ScrollBar as OLE::Exontrol.Schedule.1::ScrollBarEnum,ScrollPart as OLE::Exontrol.Schedule.1::ScrollPartEnum)
end function

function nativeObject_ScrollButtonClick(ScrollBar,ScrollPart)
return

The following VB sample displays the identifier of the scroll's button being clicked:

With Schedule1
    .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 Schedule1_ScrollButtonClick(ByVal ScrollPart As EXSCHEDULELibCtl.ScrollPartEnum)
    MsgBox (ScrollPart)
End Sub

The following VB.NET sample displays the identifier of the scroll's button being clicked:

With AxSchedule1
    .BeginUpdate()
    .ScrollBars = EXSCHEDULELib.ScrollBarsEnum.exDisableBoth
    .set_ScrollPartVisible(EXSCHEDULELib.ScrollBarEnum.exVScroll, EXSCHEDULELib.ScrollPartEnum.exLeftB1Part Or EXSCHEDULELib.ScrollPartEnum.exRightB1Part, True)
    .set_ScrollPartCaption(EXSCHEDULELib.ScrollBarEnum.exVScroll, EXSCHEDULELib.ScrollPartEnum.exLeftB1Part, "<img></img>1")
    .set_ScrollPartCaption(EXSCHEDULELib.ScrollBarEnum.exVScroll, EXSCHEDULELib.ScrollPartEnum.exRightB1Part, "<img></img>2")
    .EndUpdate()
End With
Private Sub AxSchedule1_ScrollButtonClick(ByVal sender As System.Object, ByVal e As AxEXSCHEDULELib._IScheduleEvents_ScrollButtonClickEvent) Handles AxSchedule1.ScrollButtonClick
        MessageBox.Show( e.scrollPart.ToString())
End Sub

The following C# sample displays the identifier of the scroll's button being clicked:

axSchedule1.BeginUpdate();
axSchedule1.ScrollBars = EXSCHEDULELib.ScrollBarsEnum.exDisableBoth;
axSchedule1.set_ScrollPartVisible(EXSCHEDULELib.ScrollBarEnum.exVScroll, EXSCHEDULELib.ScrollPartEnum.exLeftB1Part | EXSCHEDULELib.ScrollPartEnum.exRightB1Part, true);
axSchedule1.set_ScrollPartCaption(EXSCHEDULELib.ScrollBarEnum.exVScroll, EXSCHEDULELib.ScrollPartEnum.exLeftB1Part , "<img></img>1");
axSchedule1.set_ScrollPartCaption(EXSCHEDULELib.ScrollBarEnum.exVScroll, EXSCHEDULELib.ScrollPartEnum.exRightB1Part, "<img></img>2");
axSchedule1.EndUpdate();
private void axSchedule1_ScrollButtonClick(object sender, AxEXSCHEDULELib._IScheduleEvents_ScrollButtonClickEvent e)
{
    MessageBox.Show(e.scrollPart.ToString());
}

The following C++ sample displays the identifier of the scroll's button being clicked:

m_schedule.BeginUpdate();
m_schedule.SetScrollBars( 15 /*exDisableBoth*/ );
m_schedule.SetScrollPartVisible( 0 /*exVScroll*/, 32768  /*exLeftB1Part*/ | 32 /*exRightB1Part*/, TRUE );
m_schedule.SetScrollPartCaption( 0 /*exVScroll*/, 32768  /*exLeftB1Part*/ , _T("<img></img>1") );
m_schedule.SetScrollPartCaption( 0 /*exVScroll*/, 32 /*exRightB1Part*/ , _T("<img></img>2") );
m_schedule.EndUpdate();
void OnScrollButtonClickSchedule1(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.Schedule1
    .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))