FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Problem with menus
Posts: 6755
Joined: Wed Feb 15, 2012 08:25 PM
Re: Problem with menus
Posted: Fri Sep 25, 2015 10:09 PM
driessen wrote:Cristobal,

Is that a problem like mine 2 weeks ago?

Thanks.


No, It is another matter entirely different, I believe
Regards
Cristobal Navarro

Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noci贸n del tiempo

El secreto de la felicidad no est谩 en hacer lo que te gusta, sino en que te guste lo que haces
Posts: 6755
Joined: Wed Feb 15, 2012 08:25 PM
Re: Problem with menus
Posted: Fri Sep 25, 2015 10:10 PM
Enrico Maria Giordano wrote:Cristobal,

Something's still wrong: the width of the menu is not correctly calculated (too wide) in some cases.

EMG


You can get a picture or an example you can build?


FWH that version you are using?
Cristobal Navarro

Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noci贸n del tiempo

El secreto de la felicidad no est谩 en hacer lo que te gusta, sino en que te guste lo que haces
Posts: 6755
Joined: Wed Feb 15, 2012 08:25 PM
Re: Problem with menus
Posted: Fri Sep 25, 2015 10:11 PM
Enrico Maria Giordano wrote:Cristobal,

seems to work fine, thank you!. What's now? Will you update FWH build or...?

EMG


If we find a final solution, yes
Regards
Cristobal Navarro

Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noci贸n del tiempo

El secreto de la felicidad no est谩 en hacer lo que te gusta, sino en que te guste lo que haces
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: Problem with menus
Posted: Sat Sep 26, 2015 08:52 AM
Cristobal, here it is. The space on the right of the menu item is too big. In the previous FWH release it was reduced. Now it's increased again. I'm using latest FWH.

Code (fw): Select all Collapse
#include "Fivewin.ch"


FUNCTION MAIN()

    LOCAL oFnt, oWnd, oMen

    MENU oMen
        MENUITEM "Test"

        MENU
            MENUITEM "A very long test menu item"
        ENDMENU
    ENDMENU

    DEFINE FONT oFnt NAME "Courier New" SIZE 0, -7

    DEFINE WINDOW oWnd;
           MENU oMen

    oWnd:SetFont( oFnt )

    ACTIVATE WINDOW oWnd;
             ON CLICK TESTMENU( oWnd )

    RELEASE FONT oFnt

    RETURN NIL


STATIC FUNCTION TESTMENU( oWnd )

    LOCAL oMen

    MENU oMen POPUP
        MENUITEM "A very long test menu item"
    ENDMENU

    ACTIVATE MENU oMen AT 0, 0 OF oWnd

    RETURN oMen


EMG
Posts: 6755
Joined: Wed Feb 15, 2012 08:25 PM
Re: Problem with menus
Posted: Sat Sep 26, 2015 09:23 AM
Ok, I look and I commented

Cristobal Navarro

Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noci贸n del tiempo

El secreto de la felicidad no est谩 en hacer lo que te gusta, sino en que te guste lo que haces
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: Problem with menus
Posted: Sat Sep 26, 2015 09:47 AM

Cristobal,

Exactly! :-)

EMG

Posts: 6755
Joined: Wed Feb 15, 2012 08:25 PM
Re: Problem with menus
Posted: Sat Sep 26, 2015 10:45 AM
Enrico, Michel
I tried to adjust the dimensions of the menuitems with a similar width to which they were before if not defined font
In order to better adjust its dimensions have added the clauses NFACTOR and RIGHTSP of the MENU command and its corresponding DATA
I believe that with these adjustments we can control perfectly dimensions

Code (fw): Select all Collapse
#xcommand MENU [ <oObjMenu> ] ;
             [ <of: OF, WINDOW, DIALOG, CONTROL> <oCtrl> ] ;
             [ <popup: POPUP> ] ;
             [ <l2007: 2007, _2007> ] ;
             [ <l2010: 2010, _2010> ] ;
             [ COLORMENU  <nClrMenu> ,<nClrMenutxt> ] ;
             [ COLORSELECT  <nClrHiLi> ,<nClrHiLf> ,<nClrHitx> ] ;
             [ <left: COLORBMP, COLORLEFT>  <nClrToBa> ,<nClrBkBa> ] ;
             [ <right: COLORPNEL, COLORRIGHT>  <nClrToBr> ,<nClrBkBr> ] ;
             [ COLORSEPARATOR  <nClrHiBr> ] ;
             [ <lMenuBar: MENUBAR> ] ;
             [ FONT <oFont> ] ;
             [ <lColors: COLORS> ] ;
             [ <lVert: LINESVERT> ] ;
             [ <l2013: 2013, _2013> ] ;
             [ <l2015: 2015, _2015> ] ;
             [ <lNoBorder: NOBORDER> ] ;
             [ RIGHTSPACE <nRightSp> ] ;
             [ FACTOR <nFactor> ] ;
       => ;
        [ <oObjMenu> := ] MenuBegin( <.popup.>,, <oCtrl>, <.l2007.>, <.l2010.>,,;  //<.lUnicode.>
                         <nClrMenu>, <nClrMenutxt>, ;
                         <nClrToBa>, <nClrBkBa>, <nClrHiLi> ,<nClrHiLf>, ;
                         <nClrHitx>, <nClrHiBr>, <.lMenuBar.>, <oFont>, ;
                         <.lColors.>, <.lVert.>, <.l2013.>, <.l2015.>, ;
                         [!<.lNoBorder.>], <nClrToBr> ,<nClrBkBr>, <nRightSp>,;
                         <nFactor> )
Cristobal Navarro

Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noci贸n del tiempo

El secreto de la felicidad no est谩 en hacer lo que te gusta, sino en que te guste lo que haces
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: Problem with menus
Posted: Sat Sep 26, 2015 11:44 AM

Cristobal,

Thank you. But please, we basically need a correct default behaviour.

EMG

Posts: 6755
Joined: Wed Feb 15, 2012 08:25 PM
Re: Problem with menus
Posted: Sat Sep 26, 2015 11:59 AM
Enrico Maria Giordano wrote:Cristobal,

Thank you. But please, we basically need a correct default behaviour.

EMG


Enrico
That is the objective
Cristobal Navarro

Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noci贸n del tiempo

El secreto de la felicidad no est谩 en hacer lo que te gusta, sino en que te guste lo que haces
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM

Continue the discussion