property Chart.SelectDates as Variant
Indicates a collection of date-time units being selected.

 TypeDescription 
   Variant A Safe array that includes the dates being selected.  
The SelectedDates property can be used to retrieve all selected dates, or to select a collection of dates. The SelectDate property may be used to select or unselect a specified date-time unit. Use the UnselectDates method to unselect all dates in the chart. The ChartEndChanging(exSelectDate) event notifies your application when the user selects a new date by clicking the header of the chart. Use the SelectLevel property to specify the area being highlighted when a date is selected. You can select multiple dates keeping the CTRL key and clicking a new date. The MarkSelectDateColor property specifies the color being used to highlight the selected dates. If the MarkSelectDateColor property is identical with the BackColor property of the Chart object, the selected dates are not shown.  Use the MarkTimeZone method to highlight different time-zones.

The following VB sample displays the selected dates:

Private Sub G2antt1_ChartEndChanging(ByVal Operation As EXG2ANTTLibCtl.BarOperationEnum)
    If (Operation = exSelectDate) Then
        Debug.Print "Selected"
        For Each d In G2antt1.Chart.SelectDates
            Debug.Print d
        Next
    End If
End Sub

The following VB sample changes the collection of selected dates:

With G2antt1.Chart
    .SelectLevel = 1
    .SelectDates = Array(#6/22/2005#, #6/23/2005#)
End With


Send comments on this topic.
1999-2017 Exontrol.COM, Software. All rights reserved.