property Chart.AllowSelectObjects as SelectObjectsEnum
Sets or gets a value that indicates whether the user can select objects in the chart.

   SelectObjectsEnum A combination of SelectObjectsEnum values that indicates the objects to be selected in the chart.    
By default, the AllowSelectObjects property is exSelectObjects. The AllowSelectObjects property allows users to select at runtime the bars and links in the chart area. Use the AllowSelectObjects property to disable selecting bars and links in the chart area using the mouse. For instance, if the AllowSelectObjects property is

Also, if you want to enable selecting a single bar in your chart, the exSelectSingleObject value should be added to one of these: exSelectBarsOnly, exSelectLinksOnly and exSelectObjects. So, for instance, you need to select a single bar, the AllowSelectObjects property should be exSelectBarsOnly Or exSelectSingleObject, and if you need to select only a single link, the AllowSelectObjects property should be exSelectLinksOnly Or exSelectSingleObject

The ChartSelectionChanged event is fired when the selection in the chart is changed. Use the SelectedObject property to retrieve a collection of selected bars or/and links. You can use the selection to move all selected objects as you would move them individually. The user can select a bar or a link by clicking it. The user can use the CTRL key to select or unselect the bar or the link from the cursor. Also, the user can right click the chart area, to start selecting the bars and links that intersect the dragging rectangle. The SelBackColor property specifies the color to draw the frame around the selected bar or link. Use the ItemBar(exBarSelected) property to select or unselect programmatically a bar. Use the Link(exLinkSelected) property to select or unselect programmatically a link. Use the RemoveSelection property to remove objects in the chart's selection.

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