FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index Bugs report & fixes / Informe de errores y arreglos Bug in TMenu [Fixed]
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Bug in TMenu [Fixed]
Posted: 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 (fw): Select all Collapse
#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
Posts: 6755
Joined: Wed Feb 15, 2012 08:25 PM
Re: Bug in TMenu
Posted: Sat May 20, 2017 04: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
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: Bug in TMenu
Posted: Sat May 20, 2017 04:30 PM

Any workaround for that user?

EMG

Continue the discussion