Type | Description | |||
Long | A long expression that specifies the number of selected dates in the calendar panel. |
You can use the SelCount/SelDate or Selection to enumerate the selected dates. Use the Selection/SelectDate property to change programmatically the dates being selected in the calendar, including the dates to be shown in the schedule view.
The following VB sample shows how you can enumerate the selected dates using the SelCount and SelDate properties once the selection is changed:
Private Sub Schedule1_LayoutEndChanging(ByVal Operation As EXSCHEDULELibCtl.LayoutChangingEnum) If Operation = exCalendarSelectionChange Then Dim i As Long With Schedule1.Calendar For i = 0 To .SelCount() - 1 Debug.Print "Select: " & .SelDate(i) Next End With End If End Sub
The following VB/NET sample shows how you can enumerate the selected dates using the SelCount and SelDate properties once the selection is changed:
Private Sub Exschedule1_LayoutEndChanging(ByVal sender As System.Object, ByVal Operation As exontrol.EXSCHEDULELib.LayoutChangingEnum) Handles Exschedule1.LayoutEndChanging If Operation = exontrol.EXSCHEDULELib.LayoutChangingEnum.exCalendarSelectionChange Then Dim i As Long = 0 With Exschedule1.Calendar For i = 0 To .SelCount - 1 Debug.Print("Select: " & .get_SelDate(i)) Next End With End If End Sub
The following C# sample shows how you can enumerate the selected dates using the SelCount and SelDate properties once the selection is changed:
private void exschedule1_LayoutEndChanging(object sender, exontrol.EXSCHEDULELib.LayoutChangingEnum Operation) { if ( Operation == exontrol.EXSCHEDULELib.LayoutChangingEnum.exCalendarSelectionChange ) { for (int i = 0; i < exschedule1.Calendar.SelCount; i++) System.Diagnostics.Debug.Print("Select: " + exschedule1.Calendar.get_SelDate(i).ToString()); } }
The following VFP sample shows how you can enumerate the selected dates using the SelCount and SelDate properties once the selection is changed:
*** ActiveX Control Event *** LPARAMETERS operation * 1 ' exCalendarSelectionChange If Operation = 1 Then for i = 0 to thisform.Schedule1.Calendar.SelCount() - 1 wait window TToC(thisform.Schedule1.Calendar.SelDate(i)) next EndIf
The following C++ sample shows how you can enumerate the selected dates using the SelCount and SelDate properties once the selection is changed:
void LayoutEndChangingSchedule1(long Operation) { if ( Operation == EXSCHEDULELib::exCalendarSelectionChange ) { for ( int i = 0; i < m_spSchedule->Calendar->SelCount; i++ ) { CString sMessage; sMessage.Format(_T("Select: %f\r\n"), m_spSchedule->Calendar->SelDate[i] ); OutputDebugString( sMessage ); } } }
where m_spSchedule is of EXSCHEDULELib::ISchedulePtr type.