MarBar77 Posted March 10, 2018 Share Posted March 10, 2018 Hi, How to get component, from which menu item was clicked. I try procedure TfrElectricityOnline.mnIndicatorDeleteClick(Sender: TObject); var Caller: TObject; begin Caller := ((Sender as TUniMenuItem).GetParentMenu as TUniPopupMenu).PopupComponent; end; but it results with Caller = nil? PopupMenu is assigned in runtime to components MyComponent.PopupMenu := MyPopupMenu; Marcin Quote Link to comment Share on other sites More sharing options...
Sherzod Posted March 10, 2018 Share Posted March 10, 2018 Hi, (Sender as TUniMenuItem).GetParentMenu Are you still using the trial edition? Quote Link to comment Share on other sites More sharing options...
MarBar77 Posted March 10, 2018 Author Share Posted March 10, 2018 Neverming, I have found the problem. I have to set PopupComponent property manually in code every time when popup method is called. Quote Link to comment Share on other sites More sharing options...
MarBar77 Posted March 11, 2018 Author Share Posted March 11, 2018 I have just ordered complete edition at our Polish distributor. Quote Link to comment Share on other sites More sharing options...
Administrators Farshad Mohajeri Posted March 11, 2018 Administrators Share Posted March 11, 2018 I have just ordered complete edition at our Polish distributor. How and when did you place your order? What do you mean by Polish distributor? (Will you buy through another company?) Thank you, Quote Link to comment Share on other sites More sharing options...
MarBar77 Posted March 11, 2018 Author Share Posted March 11, 2018 I have ma an order in Friday by Polish company Dreamsoft. They are selling software from all over the world. We have in Poland complicated Tax rules, and for me is simlier to buy the software directly in Poland. They have your software in their offer: https://www.dreamsoft.com.pl/unigui-complete-1930p Marcin Quote Link to comment Share on other sites More sharing options...
Luciano França Posted June 16, 2023 Share Posted June 16, 2023 On 3/10/2018 at 8:10 AM, MarBar77 said: Hi, How to get component, from which menu item was clicked. I try procedure TfrElectricityOnline.mnIndicatorDeleteClick(Sender: TObject); var Caller: TObject; begin Caller := ((Sender as TUniMenuItem).GetParentMenu as TUniPopupMenu).PopupComponent; end; but it results with Caller = nil? PopupMenu is assigned in runtime to components MyComponent.PopupMenu := MyPopupMenu; Marcin Hello, I need a solution to this issue. Quote Link to comment Share on other sites More sharing options...
Luciano França Posted June 16, 2023 Share Posted June 16, 2023 Solution type TUniPopupMenu = Class(uniMainMenu.TUniPopupMenu) Public ObjetoPai : TObject; End; procedure TForm_MenuPrincipal.UniDBGridCellContextClick(Column: TUniDBGridColumn; X, Y: Integer); begin PopupMenu_Grid.fObjetoPai := TUniDBGrid(Column.Grid); PopupMenu_Grid.Popup(X, Y, TUniDBGrid(Column.Grid)); end; ObjetoGrid := ((Sender as TUniMenuItem).GetParentMenu as TPopupMenu).fObjetoPai Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.