Page 1 of 1

PopupMenu

Posted: Thu May 27, 2010 1:56 pm
by 10050873
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

Re: PopupMenu

Posted: Fri May 28, 2010 8:53 am
by 10046032
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

Re: PopupMenu

Posted: Fri May 28, 2010 10:52 am
by 10050873
Thank you

it works good

Regards