Mega Code Archive

 
Categories / Delphi / VCL
 

MenuItem to the right

Title: MenuItem to the right Question: How can I place a TMenuItem to the right of my form? Answer: { Let's say you have a TMainMenu MainMenu1 and a HelpMenuItem at the end of the Menubar; calling the following OnCreate- Eventhandler it 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;