XY Chart NET 3 Control Reference > Methods > SetCrosshairsMode Method |
Use this method to programmatically enable or disable the crosshairs mode. This method is equivalent to selecting the Crosshairs button in the Toolbar.
[Visual Basic] Sub SetCrosshairsMode(ButtonSelected As Boolean) |
[C#] void XYChartNETCtl.SetCrosshairsMode(bool ButtonSelected) |
[C++] void SetCrosshairsMode(bool) |
' XYChartNETCtl1 is the name of the XY Chart NET control instance placed on the form. If XYChartNETCtl1.Toolbar.Buttons.CrosshairsPressed Then XYChartNETCtl1.SetCrosshairsMode(False) 'Disable the Crosshairs; a Refresh call is not required Else XYChartNETCtl1.SetCrosshairsMode(True) 'Enable the Crosshairs; a Refresh call is not required End If