[Lazarus] Win32 setting menu shortcut
Alexey
aaa5500 at ya.ru
Thu Apr 6 23:58:47 CEST 2017
The 1st function can call 2nd and be simple.
function CompleteMenuItemCaption(const AMenuItem: TMenuItem; Spacing:
String): string;
begin
Result := AMenuItem.Caption;
if AMenuItem.ShortCut <> scNone then
Result := Result + Spacing + MenuItemShortCut(AMenuItem);
end;
(* Idem with external string caption *)
function CompleteMenuItemStringCaption(const AMenuItem: TMenuItem;
ACaption: String; Spacing: String): string;
begin
Result := ACaption;
if AMenuItem.ShortCut <> scNone then
Result := Result + Spacing + MenuItemShortCut(AMenuItem);
end;
--
Regards,
Alexey
More information about the Lazarus
mailing list