MenuItem Prompt

MenuItem Prompt

Postby Ken Wantz » Wed Nov 28, 2007 8:49 pm

I am trying to create several menu items. On the left is the menu item name and on the right is the accelerator key to use. I can approximate the position using spaces but the information on the right is not in a vertical line. I.E.

Code: Select all  Expand view

      MENUITEM "Modification Log-On        Ctrl-P" ;
         ACTION LogOn () ACCELERATOR ACC_CONTROL, ASC("P")

      MENUITEM "E&xit                      Alt-X”;
         ACTION oWndMain:end() ACCELERATOR ACC_ALT, ASC("X")


As the text is positioned using a proportional pitch font, I have found nothing in my 7.04 version that will allow me to create 2 aligned columns. Does an ability such as this exist?
Ken Wantz
 
Posts: 45
Joined: Wed Nov 29, 2006 7:48 pm
Location: Toronto Canada

Postby Antonio Linares » Wed Nov 28, 2007 9:44 pm

Ken,

Try to use Tabs Chr( 9 ) instead of spaces
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42079
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby Ken Wantz » Thu Nov 29, 2007 12:30 am

Antonio,

It was so simple, I didn't think of it. Unfortunately though, it did not work exactly as hoped.

Image

The format used was :
Code: Select all  Expand view
      MENUITEM "Next Record" + CHR(9) + "PgDn" MESSAGE "Look at next member" ;
         ACTION Dn() ACCELERATOR 0, VK_NEXT
      MENUITEM "Previous Record" + CHR(9) + "PgUp" MESSAGE "Look at previous member" ;
         ACTION Up() ACCELERATOR 0, VK_PRIOR
      MENUITEM "Locate Record" + CHR(9) + "Alt-L" MESSAGE "Look for a specific member" ;
         ACTION What := Find_Fld() ACCELERATOR ACC_ALT, ASC("L")


Might there have been a problem with the 7.04 that has been since fixed?
Ken Wantz
 
Posts: 45
Joined: Wed Nov 29, 2006 7:48 pm
Location: Toronto Canada

Postby Antonio Linares » Thu Nov 29, 2007 12:48 am

Ken,

Try to add some spaces after the tabs

> Might there have been a problem with the 7.04 that has been since fixed?

Not specifically. In FWH 7.11 we have implemented 2007 office look menus, so we do all the painting
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42079
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby Ken Wantz » Thu Nov 29, 2007 2:23 am

Antonio,


Tried spaces after the Tab with no luck. Spaces after the the shortcut text did shift the data to the left. Looks like data is placed to the left of the tab.
A close look shows that "Alt-H" is lined up slightly to the left of the two lines above.

For the disabled item I tried 2 Tabs but ended up with a square box before the shortcut as illustrated.
Then tried to see what happened if I enabled the menuitem after it was preset to DISABLED. The text remained in the same location.
If I removed DISABLED from the MenuItem command and recompiled, it shifted to the same position as the text above. I guess presetting the MenuItem to DISABLED affects any text positioning at the right hand side.


Image
Ken Wantz
 
Posts: 45
Joined: Wed Nov 29, 2006 7:48 pm
Location: Toronto Canada

Postby driessen » Thu Nov 29, 2007 2:57 pm

Ken,

I use CHR(9) for a long time and it is working fine in my application.

Could there be something wrong with your fonts ?
Regards,

Michel D.
Genk (Belgium)
_____________________________________________________________________________________________
I use : FiveWin for (x)Harbour v. 24.07 - Harbour 3.2.0 (February 2024) - xHarbour Builder (January 2020) - Bcc773
User avatar
driessen
 
Posts: 1422
Joined: Mon Oct 10, 2005 11:26 am
Location: Genk, Belgium

Postby Ken Wantz » Thu Nov 29, 2007 3:27 pm

As far as I am aware the font used in the menu is a system font.

One thing that is very wrong is if I set up the menuitem and use the DISABLED clause, the right hand margin moves to the left. I proved that by simply removing DISABLED.

Prior to using CHR9(9), movement of the right hand margin was not an issue.
Ken Wantz
 
Posts: 45
Joined: Wed Nov 29, 2006 7:48 pm
Location: Toronto Canada

Postby nageswaragunupudi » Thu Nov 29, 2007 3:33 pm

Working for me correctly whether disabled or not
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10624
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Postby Antonio Linares » Thu Nov 29, 2007 4:33 pm

Ken,

What Windows version are you using ?
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42079
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby Ken Wantz » Thu Nov 29, 2007 6:20 pm

Antonio

XP Pro sp2 + all updates up to the present

The problem is duplicated when I use Testmnu2 in the 7.04 FWH Samples and I change the following code:
Code: Select all  Expand view
MENUITEM "Item 1" + CHR(9) +  "Sub 1" MESSAGE "Item 1 - Sub 1" ;
               ACTION MsgInfo( "any action" ) ;
               ACCELERATOR 0, VK_F2
MENUITEM "Item 1" + CHR(9) +  "Sub 2" MESSAGE "Item 1 - Sub 2" DISABLED

The second disabled item is offset to the left more than the first.
Ken Wantz
 
Posts: 45
Joined: Wed Nov 29, 2006 7:48 pm
Location: Toronto Canada

Postby James Bott » Thu Nov 29, 2007 8:13 pm

It is working fine for me under XP Pro SP2 and FWH 7.10, so I am guessing it was fixed after ver 7.04.

James
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 79 guests

cron