2008. november 23., vasárnap

Right-align a menu item


Problem/Question/Abstract:

How to right-align a TMenuItem

Answer:

If you have a TMainMenu MainMenu1 and a HelpMenuItem at the end of the Menubar; calling the following OnCreate- Eventhandler will right-align the HelpMenuItem

uses
  Windows;

procedure TForm1.FormCreate(Sender: TObject);
begin
  ModifyMenu(MainMenu1.Handle, 0, mf_ByPosition or mf_Popup
    or mf_Help, HelpMenuItem1.Handle, '&Help');
end;

Nincsenek megjegyzések:

Megjegyzés küldése