c5Tooltip+btnbmp on a dialog

c5Tooltip+btnbmp on a dialog

Postby Silvio.Falconi » Sun May 05, 2019 8:51 pm

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  Expand view  RUN


 
    #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
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 7074
Joined: Thu Oct 18, 2012 7:17 pm

Re: c5Tooltip+btnbmp on a dialog

Postby Silvio.Falconi » Mon May 06, 2019 4:25 pm

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
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 7074
Joined: Thu Oct 18, 2012 7:17 pm

Re: c5Tooltip+btnbmp on a dialog

Postby ukoenig » Mon May 06, 2019 5:09 pm

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
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany

Re: c5Tooltip+btnbmp on a dialog

Postby Silvio.Falconi » Mon May 06, 2019 9:55 pm

Uwe,
with
Code: Select all  Expand view  RUN
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 ?
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 7074
Joined: Thu Oct 18, 2012 7:17 pm

Re: c5Tooltip+btnbmp on a dialog

Postby Silvio.Falconi » Fri May 10, 2019 11:21 am

Antonio, any solution pls?
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 7074
Joined: Thu Oct 18, 2012 7:17 pm


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: nageswaragunupudi and 35 guests