Solved

Right jestifing menu bar

Posted on 1998-08-13
3
146 Views
Last Modified: 2010-04-04
I need to adjest my menu bar (Main menu) to the right alignment, who can I do that ?
0
Comment
Question by:Motaz
  • 2
3 Comments
 
LVL 7

Author Comment

by:Motaz
ID: 1362003
I use Delphi 3
0
 
LVL 4

Accepted Solution

by:
erajoj earned 0 total points
ID: 1362004
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
 
LVL 4

Expert Comment

by:erajoj
ID: 1362005
Sorry!
Missed:
    .....

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

/// John
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
Internet Business Fax to Email Made Easy - With  eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, f…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now