[Lazarus] Win32 setting menu shortcut

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[Lazarus] Win32 setting menu shortcut

Free Pascal - Lazarus mailing list
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

--
_______________________________________________
Lazarus mailing list
[hidden email]
http://lists.lazarus-ide.org/listinfo/lazarus
Loading...