OnMouseMove event
The OnMouseMove event is used to trigger changes in the cursor. The cursor does NOT automatically change from a regular mouse pointer: to a link pointer:
All the bar charts that use OnClickSeries events also use an OnMouseMove event to make the pointer change to a link pointer when one of the bars is hovered over. There are not many other uses for this event at this time. Here is the code snippet:
|
procedure DPTeeChart1OnMouseMove(X: Integer; Y: Integer); var ClickedPart:TExoClickedPart; begin ClickedPart:=DPTeeChart1.CalcClickedPart(X, Y); if ClickedPart.Part=cpSeries then DPTeeChart1.Cursor := -21 else DPTeeChart1.Cursor := 0; end; |
Notice the use of the function DPTeeChart1.CalcClickedPart(X, Y) to return a value which indicates which part of the chart was “clicked” (a “mouse move” event is internally handled much like a click event – hundreds of little events fire every time you move your mouse). The cursor is then changed to -21 if it is part of the Series (i.e. a bar , pie slice, etc.). The value -21 represents the link pointer. The value 0 represents the regular arrow mouse pointer.