Type | Description | |||
Boolean | A Boolean expression that specifies whether the control supports single or multiple selection. |
The following samples show how you can enumerate the selected dates, in the calendar panel, once the LayoutEndChanging(exCalendarSelectionChange) event occurs.
VB
Private Sub Schedule1_LayoutEndChanging(ByVal Operation As EXSCHEDULELibCtl.LayoutChangingEnum) If Operation = exCalendarSelectionChange Then Dim d As Variant For Each d In Schedule1.Calendar.Selection Debug.Print "Select: " & d Next End If End Sub
VB/NET
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 For Each d As DateTime In Exschedule1.Calendar.SelDates Debug.Print(d.ToString()) Next End If End Sub
or:
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 For Each d As DateTime In Exschedule1.Calendar.Selection Debug.Print(d.ToString()) Next End If End Sub
C#
private void exschedule1_LayoutEndChanging(object sender, exontrol.EXSCHEDULELib.LayoutChangingEnum Operation) { if ( Operation == exontrol.EXSCHEDULELib.LayoutChangingEnum.exCalendarSelectionChange ) { foreach (DateTime d in exschedule1.Calendar.SelDates) System.Diagnostics.Debug.Print(d.ToString()); } }
or:
private void exschedule1_LayoutEndChanging(object sender, exontrol.EXSCHEDULELib.LayoutChangingEnum Operation) { if ( Operation == exontrol.EXSCHEDULELib.LayoutChangingEnum.exCalendarSelectionChange ) { foreach (DateTime d in exschedule1.Calendar.Selection as Array) System.Diagnostics.Debug.Print(d.ToString()); } }
VFP
*** 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
C++
void LayoutEndChangingSchedule1(long Operation) { if ( Operation == EXSCHEDULELib::exCalendarSelectionChange ) { _variant_t selection = m_spSchedule->Calendar->Selection; if ( V_VT( &selection ) == ( VT_ARRAY | VT_VARIANT ) ) { BYTE* p = NULL; long nCount = 0; if ( SUCCEEDED( SafeArrayGetUBound( V_ARRAY( &selection ), 1, &nCount ) ) ) { if ( SUCCEEDED( SafeArrayAccessData( V_ARRAY( &selection ), (LPVOID*)&p ) ) ) { for ( long i = 0; i < nCount + 1; i++, p += sizeof(VARIANT) ) { VARIANT* pValue = (VARIANT*)p; if ( V_VT( pValue ) == VT_DATE ) { CString strMessage; strMessage.Format( _T("Select: %f\r\n"), V_DATE( pValue ) ); OutputDebugString( strMessage ); } } SafeArrayUnaccessData( V_ARRAY( &selection ) ); } } } } }
where m_spSchedule is of EXSCHEDULELib::ISchedulePtr type.