Bug in TMenu [Fixed]

Bug in TMenu [Fixed]

Postby Enrico Maria Giordano » Thu Oct 05, 2017 12:40 pm

The menuitems of the main menubar are too wide.

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8715
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: Bug in TMenu

Postby Enrico Maria Giordano » Thu Oct 05, 2017 12:43 pm

This is a sample:

Code: Select all  Expand view
#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
User avatar
Enrico Maria Giordano
 
Posts: 8715
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: Bug in TMenu

Postby Enrico Maria Giordano » Thu Oct 05, 2017 12:45 pm

Any quick and dirty workaround, please?

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8715
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: Bug in TMenu

Postby Enrico Maria Giordano » Thu Oct 05, 2017 1:09 pm

This is what I get:

Image

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8715
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: Bug in TMenu

Postby cnavarro » Thu Oct 05, 2017 3:38 pm

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 view


   GetnWidthItem( 0.5 )

 


There are users who like the widest items to make the menus more readable
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
User avatar
cnavarro
 
Posts: 6548
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

Re: Bug in TMenu

Postby Enrico Maria Giordano » Thu Oct 05, 2017 5:20 pm

With

Code: Select all  Expand view
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
User avatar
Enrico Maria Giordano
 
Posts: 8715
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: Bug in TMenu

Postby cnavarro » Thu Oct 05, 2017 6:41 pm

Enrico, your are right
I answered too fast
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
User avatar
cnavarro
 
Posts: 6548
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

Re: Bug in TMenu

Postby Enrico Maria Giordano » Thu Oct 05, 2017 8:48 pm

No problem. Any workaround?

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8715
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: Bug in TMenu

Postby cnavarro » Thu Oct 05, 2017 8:58 pm

Please, wait
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
User avatar
cnavarro
 
Posts: 6548
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

Re: Bug in TMenu [Fixed]

Postby karinha » Tue Mar 28, 2023 12:57 am

Code: Select all  Expand view

   GetnWidthItem( 0.8 ) // Funciona

   MENU oMenu
 


Regards, saludos.
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
User avatar
karinha
 
Posts: 7824
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil


Return to Bugs report & fixes / Informe de errores y arreglos

Who is online

Users browsing this forum: No registered users and 3 guests