Vote UpVote

Quick tip – assigning Command+Letter shortcuts to FMX menu items

Delphi Haven – It’s not obvious since the forms designer doesn’t support it, but the way to assign a Cmd+Letter shortcut to a menu item in FireMonkey/OS X application in XE2 is to do so at runtime. For example, say you have a ‘file open’ item called itmFileOpen, and want to assign it the shortcut Cmd+O; to do so, create an OnCreate event handler for the form by double clicking it, then add the following line: mnuFileOpen := scCommand or Ord('O'); At runtime, this will ensure the proper shortcut symbol appears next to the item (⌘O), as well as make the actual key combination work.
Favorite? Off-Topic? Chris Rolliston @ 2012-07-09 09:16


Visits: 511
Votes: 2
Favorites: 0
Off-Topic: 0

Visits by Source

User Actions

Users who voted for this posting

Kyle A. Miller
Contact us to advertise on DelphiFeeds.com

Community Links

Torry Firebird News


Please login or register to use this functionality.
(click on this box to dismiss)