Page 1 of 2

In place tooltips!

PostPosted: Tue Aug 26, 2008 1:29 pm
by Antonio Linares
A new Class TToolTip for FWH 8.09, that allows to use in place tooltips!

test.prg
Code: Select all  Expand view
// In place tooltips demo

#include "FiveWin.ch"

function Main()

   local oWnd, oSay1, oSay2, oSay3

   DEFINE WINDOW oWnd TITLE "Tooltips in place test"

   @ 2, 2 SAY oSay1 PROMPT "This is a tooltips test for any text length" COLOR "N/W*"
     
   oSay1:lWantClick = .T.
   oSay1:bMMoved = { || ShowTooltip( oSay1 ) }
   
   @ 4, 2 SAY oSay2 PROMPT "This is another long text" COLOR "N/R*"

   oSay2:lWantClick = .T.
   oSay2:bMMoved = { || ShowTooltip( oSay2 ) }

   @ 6, 2 SAY oSay3 PROMPT "FiveWin power!" COLOR "N/G*"

   oSay3:lWantClick = .T.
   oSay3:bMMoved = { || ShowTooltip( oSay3 ) }

   ACTIVATE WINDOW oWnd

return nil

function ShowTooltip( oSay )

   if oSay:Cargo == nil
      oSay:Cargo = TToolTip():New( oSay, oSay:GetText() )
      oSay:Cargo:SetWidth( 1000 )
   endif
   
return nil     

Image
Image
Image

PostPosted: Tue Aug 26, 2008 1:34 pm
by Antonio Linares
Here you have the EXE to test it:

http://rapidshare.com/files/140252181/test.zip.html

PostPosted: Tue Aug 26, 2008 2:13 pm
by James Bott
Antonio,

Could you explain how this new tooltip is different than the tooltips we already had?

Regards,
James

PostPosted: Tue Aug 26, 2008 6:55 pm
by Antonio Linares
James,

These are tooltips that appear when the user hovers the mouse over a string that cannot be displayed in its entirety. The tooltip overlays the partially-displayed text and provides the remainder of the text that had been truncated.

Windows uses them in treeviews and some other controls. Now we can use them too where we may need them or want them to be shown.

Please notice that the tooltip is placed in the same location of the control and not below it.

PostPosted: Wed Aug 27, 2008 1:15 pm
by Silvio
Dear Antonio ,
last year I wanted to create a new ttooltip class but there is some one let me sad it is was no usefull because we can use tooltip of fivewin.

My idea was to create this
Look it please http://www.devcomponents.com/dotnetbar/ ... ltips.aspx

PostPosted: Wed Aug 27, 2008 2:30 pm
by hag
Antonio:

When is 809 to be released?

PostPosted: Wed Aug 27, 2008 2:56 pm
by Antonio Linares
Harvey,

809 --> 8 means the year (2008), 09 means the month (september) :-)

http://forums.fivetechsoft.com/viewtopic.php?t=5260

PostPosted: Wed Aug 27, 2008 2:58 pm
by Antonio Linares
Silvio,

Better use a dialogbox instead of them, so you can implement all sort of features :-)

PostPosted: Wed Aug 27, 2008 3:36 pm
by hag
Antonio
> 09 --> 8 means the year (2008), 09 means the month (september)

I know all that. How about Sept date? Could use the new tooltip feature now.

PostPosted: Wed Aug 27, 2008 6:30 pm
by Antonio Linares
Harvey,

Are you using FWH 8.08 ?

If yes, then you could beta test this new tooltips feature. 8.08 code, with some changes, is required for it.

PostPosted: Wed Aug 27, 2008 6:44 pm
by hag
I think I'm using 807 but will check.

Antonio:
How do I get copies of HBZIP.LIB and ZLIB.lib for Harbour. Need to have zip features in program.

PostPosted: Wed Aug 27, 2008 6:46 pm
by Antonio Linares
Harvey,

Are you using Harbour or xHarbour ?

PostPosted: Wed Aug 27, 2008 6:50 pm
by hag
Harbour...

PostPosted: Wed Aug 27, 2008 6:59 pm
by Antonio Linares
Harvey,

Please review this library and the included examples,

http://rapidshare.com/files/140599223/hbmzip.zip.html

PostPosted: Wed Aug 27, 2008 7:02 pm
by Enrico Maria Giordano
hag wrote:How do I get copies of HBZIP.LIB and ZLIB.lib for Harbour. Need to have zip features in program.


The correct libraries for the current Harbour are

hbziparch.lib
hbzlib.lib

EMG