Page 1 of 1

Bug in TMenu [Fixed]

PostPosted: Sat May 20, 2017 12:13 pm
by Enrico Maria Giordano
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

Re: Bug in TMenu

PostPosted: Sat May 20, 2017 4:23 pm
by cnavarro
Fixed, thanks

Re: Bug in TMenu

PostPosted: Sat May 20, 2017 4:29 pm
by Enrico Maria Giordano
Thank you! :-)

EMG

Re: Bug in TMenu

PostPosted: Sat May 20, 2017 4:30 pm
by Enrico Maria Giordano
Any workaround for that user?

EMG