PopupMenu

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
Calou
Advanced
Posts: 104
Joined: Wed Nov 19, 2008 12:00 am

PopupMenu

Post by Calou » Thu May 27, 2010 1:56 pm

Hello,

I have different charts with the same popupMenu. When the user click on a popupmenu's tmenuitem, how could i do to know which chart is it?

Thanks for help

Regards

johnnix
Advanced
Posts: 192
Joined: Tue Jul 10, 2007 12:00 am

Re: PopupMenu

Post by johnnix » Fri May 28, 2010 8:53 am

Hello,

A quick way is to define a global variable of TChart and inside the OnContextPopup write something like:

Code: Select all

procedure TForm1.Chart1ContextPopup(Sender: TObject; MousePos: TPoint;
  var Handled: Boolean);
begin
  GlobalPLot := sender as TChart; // your global variable
end;
Regards

Calou
Advanced
Posts: 104
Joined: Wed Nov 19, 2008 12:00 am

Re: PopupMenu

Post by Calou » Fri May 28, 2010 10:52 am

Thank you

it works good

Regards

Post Reply