Page 1 of 1
Finding the cell a mouse entered in a polargrid?
Posted: Wed Sep 26, 2007 4:26 am
by 10545685
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!
Posted: Wed Sep 26, 2007 8:15 am
by narcis
Hi pappa,
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;