Finding the cell a mouse entered in a polargrid?
Finding the cell a mouse entered in a polargrid?
Is there an event that will give me the specific cell (i.e. sector and track) that a mouse has entered or exited in a PolarGrid? If so, what is it and what are some examples of it's use? Thanks in advance for your help!
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi pappa,
Yes, you can use OnMouseMove event and series' Clicked method as shown here:
Yes, you can use OnMouseMove event and series' Clicked method as shown here:
Code: Select all
procedure TForm1.Chart1MouseMove(Sender: TObject; Shift: TShiftState; X,
Y: Integer);
var index: Integer;
begin
index:=Series1.Clicked(X,Y);
if index<>-1 then
begin
Chart1.Title.Text.Clear;
Chart1.Title.Text.Add(IntToStr(index));
Chart1.Title.Text.Add('Track: ' + IntToStr(index mod Series1.NumTracks));
Chart1.Title.Text.Add('Sector: ' + IntToStr(index div Series1.NumSectors));
end;
end;
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |