Right jestifing menu bar

I need to adjest my menu bar (Main menu) to the right alignment, who can I do that ?
LVL 7
MotazAsked:
Who is Participating?
 
erajojConnect With a Mentor Commented:
Is this what you want?:

var
  uiFlags : UINT;

......

  if ( MainMenu1.Items.Count > 0 ) then
  with MainMenu1.Items[ 0 ] do begin
    {$IFDEF WIN32}
    uiFlags := MF_BYPOSITION or MF_RIGHTJUSTIFY;
    if Count > 0 then uiFlags := uiFlags or MF_POPUP;
    ModifyMenu( MainMenu1.Handle, 0, uiFlags, Handle, PChar( Caption ) );
    {$ELSE}
    Caption := #8 + Caption;
  end;

Just paste it in your create event, or whereever.

/// John
0
 
MotazAuthor Commented:
I use Delphi 3
0
 
erajojCommented:
Sorry!
Missed:
    .....

    {$ELSE}
    Caption := #8 + Caption;
    {$ENDIF} // <<<<<< 
    .....

/// John
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.