Page 1 of 1

Bug in TMenu [Fixed]

Posted: Thu Oct 05, 2017 12:40 pm
by Enrico Maria Giordano
The menuitems of the main menubar are too wide.

EMG

Re: Bug in TMenu

Posted: Thu Oct 05, 2017 12:43 pm
by Enrico Maria Giordano
This is a sample:

Code: Select all | Expand

#include "Fivewin.ch"


FUNCTION MAIN()

    LOCAL oWnd, oMenu

    MENU oMenu 2015
        MENUITEM "Test1"
        MENUITEM "Test2"
        MENUITEM "Test3"
        MENUITEM "Test4"
        MENUITEM "Test5"
    ENDMENU

    DEFINE WINDOW oWnd;
           MENU oMenu

    ACTIVATE WINDOW oWnd

    RETURN NIL


EMG

Re: Bug in TMenu

Posted: Thu Oct 05, 2017 12:45 pm
by Enrico Maria Giordano
Any quick and dirty workaround, please?

EMG

Re: Bug in TMenu

Posted: Thu Oct 05, 2017 1:09 pm
by Enrico Maria Giordano
This is what I get:

Image

EMG

Re: Bug in TMenu

Posted: Thu Oct 05, 2017 3:38 pm
by cnavarro
This not a bug
In menus with styles and not fonts or clause COLORS ( OWNERDRAW items ), you know solution for adjust width of items

Code: Select all | Expand



   GetnWidthItem( 0.5 )

 


There are users who like the widest items to make the menus more readable

Re: Bug in TMenu

Posted: Thu Oct 05, 2017 5:20 pm
by Enrico Maria Giordano
With

Code: Select all | Expand

GetnWidthItem( 0.5 )


the dropdowns widths are changed too. How can I change the widths of the menuitems on the menubar withouth affecting the menuitems on the dropdowns?

EMG

Re: Bug in TMenu

Posted: Thu Oct 05, 2017 6:41 pm
by cnavarro
Enrico, your are right
I answered too fast

Re: Bug in TMenu

Posted: Thu Oct 05, 2017 8:48 pm
by Enrico Maria Giordano
No problem. Any workaround?

EMG

Re: Bug in TMenu

Posted: Thu Oct 05, 2017 8:58 pm
by cnavarro
Please, wait

Re: Bug in TMenu [Fixed]

Posted: Tue Mar 28, 2023 12:57 am
by karinha

Code: Select all | Expand

   GetnWidthItem( 0.8 ) // Funciona

   MENU oMenu
 
Regards, saludos.