Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » Elevate Web Builder Technical Support » Support Forums » Elevate Web Builder General » View Thread |
Messages 1 to 3 of 3 total |
TMenu itemindex |
Sat, Feb 25 2017 5:48 AM | Permanent Link |
kamran | Hi
So I have a menu filled with options. I want to use the selected menu item to do further processing down the line. Just trying to work out how to get hold of the selected caption from a Tmenu is the itemindex of menus available to check? whats the format to get hold of this ? My code: function TMenuFrm.HeaderMenuItemClick(Sender: TObject): Boolean; begin with TIAMODataFrm.MenuHeader do begin Columns['menuheader_name'].SortDirection:=sdAscending; SortCaseInsensitive:=True; Sort; InitFind; // get the menu caption of item selected here and use to find the record Columns['menuheader_name'].AsString:=Columns['menuheader_name'].AsString:=HeaderMenu.items[HeaderMenu.itemindex].Caption; // if Find(False,True) then begin Result:=True; end else Result:=False; end; end; thanks Kamran |
Sat, Feb 25 2017 9:01 AM | Permanent Link |
Uli Becker | How about TMenuItem(Sender).Caption in the OnClick event.?
If you need an ID, you can use the MenuItem's tag and get the ID by TMenuItem(Sender).Tag. Uli |
Sat, Feb 25 2017 1:38 PM | Permanent Link |
kamran | Thanks Uli
I will have a go ... cheers kamran Uli Becker wrote: How about TMenuItem(Sender).Caption in the OnClick event.? If you need an ID, you can use the MenuItem's tag and get the ID by TMenuItem(Sender).Tag. Uli |
This web page was last updated on Sunday, May 19, 2024 at 08:46 AM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |