Solved

Right jestifing menu bar

Posted on 1998-08-13
3
154 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

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

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
In this video, viewers are given an introduction to using the Windows 10 Snipping Tool, how to quickly locate it when it's needed and also how make it always available with a single click of a mouse button, by pinning it to the Desktop Task Bar. Int…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…

717 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