Bug in TMenu [Fixed]

Bug in TMenu [Fixed]

Postby Enrico Maria Giordano » Sat May 20, 2017 12:13 pm

A user reported this problem. Please open the tray menu and click on Show or on Hide. The logo will disappear.

Code: Select all  Expand view
#include "wcolors.ch"
#include "Fivewin.CH"

static oWnd, oTray, oIcon

function TESTIT()

  local oIcon1

  DEFINE ICON oIcon  FILE "c:\fwh\icons\fivewin.ICO"
  DEFINE ICON oIcon1 FILE "c:\fwh\icons\folder.ico"

  DEFINE WINDOW oWnd TITLE "Icon Tray Class for FiveWin! from Jim Gale" ICON oIcon

  ACTIVATE WINDOW oWnd ;
     ON INIT oTray := TTrayIcon():New( oWnd, oIcon, "Testing tray ...",;
             { || MsgInfo( "Left CLick" ) },;
             { | nRow, nCol | MenuTray( nRow, nCol, oTray ) } ) ;
     VALID oTray:End() ;
     ON RIGHT CLICK oTray:SetIcon( oIcon1, "Another" )

return NIL

***********************************************************

FUNCTION MenuTray( nRow, nCol )

   LOCAL oMenu
   LOCAL cFontMenu  := "Verdana"
   LOCAL nHFontMenu := 14
   LOCAL oFontMenu

   DEFINE FONT oFontMenu NAME cFontMenu SIZE 0, -nHFontMenu

   MENU oMenu POPUP FONT oFontMenu 2013 LOGOMENU "c:\fwh\bitmaps\pngs\image1.png"

        MENUITEM "Show" ACTION oWnd:Show(), oWnd:SetFocus()
        MENUITEM "Hide" ACTION oWnd:Hide()
        SEPARATOR
        MENUITEM "Close Application" ACTION oWnd:end()

   ENDMENU

   ACTIVATE POPUP oMenu AT nRow, nCol OF oTray:oWnd

return NIL


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

Re: Bug in TMenu

Postby cnavarro » Sat May 20, 2017 4:23 pm

Fixed, thanks
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: 6498
Joined: Wed Feb 15, 2012 8:25 pm
Location: España


Re: Bug in TMenu

Postby Enrico Maria Giordano » Sat May 20, 2017 4:30 pm

Any workaround for that user?

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


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

Who is online

Users browsing this forum: No registered users and 6 guests