Finding the cell a mouse entered in a polargrid?

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
pappa
Newbie
Newbie
Posts: 2
Joined: Mon Jun 25, 2007 12:00 am

Finding the cell a mouse entered in a polargrid?

Post by pappa » Wed Sep 26, 2007 4:26 am

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!

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Wed Sep 26, 2007 8:15 am

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;
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Post Reply