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

     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()
        MENUITEM "Close Application" ACTION oWnd:end()


   ACTIVATE POPUP oMenu AT nRow, nCol OF oTray:oWnd

return NIL

User avatar
Enrico Maria Giordano
Posts: 6655
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
Muchas gracias. Many thanks.

Cristobal Navarro - Harbour (r1601050904) - xHarbour (Build 20150603) - VS 2015/17 - FWH 17.12

Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
User avatar
Posts: 3883
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

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

Who is online

Users browsing this forum: No registered users and 1 guest