Solved

Right jestifing menu bar

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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

839 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