c5Tooltip+btnbmp on a dialog

Post Reply
User avatar
Silvio.Falconi
Posts: 4956
Joined: Thu Oct 18, 2012 7:17 pm

c5Tooltip+btnbmp on a dialog

Post by Silvio.Falconi »

I need to show many Informaton and I need c5Tooltip but there is a problem

I tried with this code but when I move the mouse to another btnbmp it create a new tooltip without delete that first created ( see the picture under)

this test create 7 btnbmp , you can try to move the mouse and it show the tooltip it make the error I post under ... the same test with window make not error why ?
How I can resolve ?

Code: Select all

 

  
    #include"fivewin.ch"

    function TestCurrent()

       local oDlg, oFont, oBtn, aBtn[ 7 ]
       local nRow, nCol, n

       DEFINE FONT oFont NAME "TAHOMA" SIZE 0,-14

       DEFINE DIALOG oDlg SIZE 600,200 PIXEL TRUEPIXEL FONT oFont

       nRow  := 50
       nCol  := 30

       for n := 1 to 7

          @ nRow, nCol BTNBMP aBtn[ n ] RESOURCE "c:\fwh\bitmaps\alphabmp\world.bmp" ;
             SIZE 64,64 PIXEL OF oDlg FLAT TOP COLOR CLR_WHITE,CLR_GREEN NOBORDER

          WITH OBJECT ( oBtn := aBtn[ n ] )
             :Cargo      := n
             :bAction    := { |oBtn| oBtn:Toggle() }
             :bClrGrad   := { |l,oBtn| If( oBtn:lPressed, CLR_HRED, CLR_GREEN ) }
             :cTooltip   := { |oBtn| HazC5ToolTip( oBtn ,oDlg)}
          END
          nCol  += 80
       next n

     

       ACTIVATE DIALOG oDlg CENTERED
       RELEASE FONT oFont

    return nil

    //------------------------------------------------------------------------------------------------------------//
    Function HazC5ToolTip( oCtrl ,oDlg)

       Local oTip

       //New( nTop, nLeft, nWidth, nHeight, oWnd, lDisenio, nClrPane, nClrPane2, nClrText, nWRadio, nHRadio ) CLASS TC5ToolTip
       oTip := TC5ToolTip():New( 0,0 , 200, 150, oDlg, , CLR_HGRAY, CLR_HGRAY, CLR_BLUE, 0 , 0 )

       oTip:nTimer                    := -1 //15000
       oTip:lLineHeader           := .T.
       oTip:cHeader                 := "Header"
       oTip:cBmpHeader         := "..\bitmaps\16edit.bmp"

       oTip:cHeader2                := "Header 2"

       oTip:lLineFoot               := .T.
       oTip:cFoot                     := "Footer"
       oTip:cBmpFoot             := "..\bitmaps\16object.bmp"

       oTip:lSplitHdr                := .T.
       oTip:lLeft                       := .T.
       oTip:cBmpLeft               := "..\bitmaps\16code.bmp"

       oTip:lRightAlignBody  := .T.

       oTip:cBody                   := "In un posto a la macchia di cui non voglio ricordare il nome"

       oTip:lBtnClose              := .F.   //.T.
       oTip:lBorder                 := .F.

       oTip:lBalloon               := .T.

       oCtrl:oToolTip      := oTip

    Return oTip
    
 

and this is the error


Image


I search on this forum but I not found a solution for this error
I use : FiveWin for Harbour August 2020 (Revision) - Harbour 3.2.0dev (r1712141320) - Bcc7.30 - xMate ver. 1.15.3 - PellesC
User avatar
Silvio.Falconi
Posts: 4956
Joined: Thu Oct 18, 2012 7:17 pm

Re: c5Tooltip+btnbmp on a dialog

Post by Silvio.Falconi »

the problem is not close the tooltip
perhaps need a ::oWnd:NcMouseMove() on mousemove (btnbmp) but I not understood where


on fivewin upgrade of
New FTDN July/Julio 2015 (FWH 15.07)
* Enhancement: modify class TGET will implementation C5ToolTip
viewtopic.php?f=6&t=29368#p180138


I found an error
I explain you

there is an error because I see two tooltip
c5tooltip and
fwh tooltip


see the image
Image
I use : FiveWin for Harbour August 2020 (Revision) - Harbour 3.2.0dev (r1712141320) - Bcc7.30 - xMate ver. 1.15.3 - PellesC
User avatar
ukoenig
Posts: 3981
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany
Contact:

Re: c5Tooltip+btnbmp on a dialog

Post by ukoenig »

Silvio,

You can disable the basic tooltip

Function HazC5ToolTip( oCtrl )
Local oTip

oCtrl:cTooltip := "" // disable normal tooltip
oTip := TC5ToolTip():New( 0,0 , 200, 150, oWnd, , CLR_HGRAY, CLR_HGRAY, CLR_BLUE, 0 , 0 )

regards
Uwe :D
Since 1995 ( the first release of FW 1.9 )
i work with FW.
If you have any questions about special functions, maybe i can help.
User avatar
Silvio.Falconi
Posts: 4956
Joined: Thu Oct 18, 2012 7:17 pm

Re: c5Tooltip+btnbmp on a dialog

Post by Silvio.Falconi »

Uwe,
with

Code: Select all

oCtrl:cTooltip := "" // disable normal tooltip
I see the same the tooltip of fwh

And for the error on btnbmp ?

Do you try the test i post?

HOW I can resolve ?
I use : FiveWin for Harbour August 2020 (Revision) - Harbour 3.2.0dev (r1712141320) - Bcc7.30 - xMate ver. 1.15.3 - PellesC
User avatar
Silvio.Falconi
Posts: 4956
Joined: Thu Oct 18, 2012 7:17 pm

Re: c5Tooltip+btnbmp on a dialog

Post by Silvio.Falconi »

Antonio, any solution pls?
I use : FiveWin for Harbour August 2020 (Revision) - Harbour 3.2.0dev (r1712141320) - Bcc7.30 - xMate ver. 1.15.3 - PellesC
Post Reply