JGMS 2 Posted October 13, 2023 A menuitem in Delphi (11.3 Enterprise) FMX has no "hint" property by default. How can I add the Hint and Showhint properties to the menuitem class to show them in the Object Inspector? Share this post Link to post
Sherlock 663 Posted October 14, 2023 Since FMX components have no hints altogether you'll need to program them on your own. Or look into our german site https://www.delphipraxis.net/169747-brennende-hinweise-fmx-hints-thintmanager-1-3-a.html. Alternatively you can go the way of the accepted answer from here: https://stackoverflow.com/questions/22417565/is-there-any-way-to-add-a-hint-or-tooltip-with-firemonkey Keep in mind however, that hints or tooltips are not something common on mobile devices! Share this post Link to post
JGMS 2 Posted October 14, 2023 Thank you @Sherlock. I followed the links you posted, but it did not help me any further. In Delphi 11.3 FMX the common Windows components have hints, except for the menuitems. MenuItems do have the Hint, ShowHint and the HitTest property too, but these are not visible in the Object Inspector. I just tried the following to assign the names of the menuitems to the text of their hints: For var I : Integer := 0 to Form1.ComponentCount -1 DO if Form1.components[I] is TMenuItem then begin (Form1.components[I] as TMenuItem).Hittest := True; (Form1.components[I] as TMenuItem).ShowHint := True; (Form1.components[I] as TMenuItem).Hint := (Form1.components[I] as TMenuItem).name; end; This seems to work, though not in the right way: only the topline mainmenu items invoke hints. Having a mainmenu with items, like "File", "Options", an so on, hoving over them with the mouse shows the names of the sub-menuitems in "Files". Rather weird, isn't it? Has anybody idea's how to get correct hints for (sub-)menuitems? Share this post Link to post