Solved

Right jestifing menu bar

Posted on 1998-08-13
3
145 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

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
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…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

757 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

21 Experts available now in Live!

Get 1:1 Help Now