FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour MenuItem Prompt
Posts: 45
Joined: Wed Nov 29, 2006 07:48 PM
MenuItem Prompt
Posted: Wed Nov 28, 2007 08: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.

 
      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?
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
MenuItem Prompt
Posted: Wed Nov 28, 2007 09:44 PM

Ken,

Try to use Tabs Chr( 9 ) instead of spaces

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 45
Joined: Wed Nov 29, 2006 07:48 PM
MenuItem Prompt
Posted: 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.



The format used was :
      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?
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
MenuItem Prompt
Posted: 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
Posts: 45
Joined: Wed Nov 29, 2006 07:48 PM
MenuItem Prompt
Posted: Thu Nov 29, 2007 02: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.


Posts: 1467
Joined: Mon Oct 10, 2005 11:26 AM
MenuItem Prompt
Posted: Thu Nov 29, 2007 02: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. 25.12 - Harbour 3.2.0 (May 2025) - xHarbour Builder (January 2020) - Bcc773

Posts: 45
Joined: Wed Nov 29, 2006 07:48 PM
MenuItem Prompt
Posted: Thu Nov 29, 2007 03: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.

Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
MenuItem Prompt
Posted: Thu Nov 29, 2007 03:33 PM

Working for me correctly whether disabled or not

Regards



G. N. Rao.

Hyderabad, India
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
MenuItem Prompt
Posted: Thu Nov 29, 2007 04:33 PM

Ken,

What Windows version are you using ?

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 45
Joined: Wed Nov 29, 2006 07:48 PM
MenuItem Prompt
Posted: Thu Nov 29, 2007 06: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:
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.
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
MenuItem Prompt
Posted: Thu Nov 29, 2007 08: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

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10

Continue the discussion