Solved

right aligned "Help" menu?

Posted on 1998-08-12
3
142 Views
Last Modified: 2010-04-04
in Delphi1 menuitem1.caption:=Char(9)+"Caption" works, but this trick do not work in Delphi3?
How I do it?
0
Comment
Question by:Edukas
3 Comments
 
LVL 7

Expert Comment

by:Motaz
ID: 1362000
Hi Edukas..
Try this :

  Open1.Caption:='                Open';
  Save1.Caption:='      Save into file';
  Exit1.Caption:='                   E&xit';

0
 
LVL 2

Expert Comment

by:kjteng
ID: 1362001
I thought it is supposed to be

menuitem1.caption:= chr(8)+ 'Caption'?

ie by adding backspace character to the menuitem text in menu resource statement

I will check out why it doesn't work, may be the windows API has changed but M$ did tell us?  
0
 
LVL 4

Accepted Solution

by:
erajoj earned 20 total points
ID: 1362002
Very simple:

  {$IFDEF WIN32}
  ModifyMenu( MainMenu1.Handle, 3 {if 4th position}, MF_BYPOSITION or MF_POPUP or MF_HELP, Help1.Handle, PChar( Help1.Caption ) );
  {$ELSE}
  Help1.Caption := #8 + Help1.Caption;
  {$ENDIF}

/// John
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
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…
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…

809 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