FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour change tooltips..how?
Posts: 598
Joined: Tue Apr 15, 2008 04:51 PM
change tooltips..how?
Posted: Mon Aug 11, 2008 09:27 PM

I would like to change size and time tooltip appears. How would I do this?

Thank you

Harvey
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
change tooltips..how?
Posted: Mon Aug 11, 2008 10:04 PM

Harvey,

  1. You can change the size of the tooltip specifying a larger text or a multiline text, i.e.: "This is a" + CRLF + "multiline tooltip" + CRLF + "test"

Also, FWH now supports an array instead of a text for a tooltip, using this format:

oControl:cToolTip := { cToolTipText, [cHeader, [nIcon]], [nForeColor], [nBackColor] }

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 598
Joined: Tue Apr 15, 2008 04:51 PM
change tooltips..how?
Posted: Mon Aug 11, 2008 10:25 PM

Thanks for the quick resoponse.

I use "This is a" + CRLF + "multiline tooltip" + CRLF + "test" but there seems to be a limit on the amount of text. In 16bit never had a problem. Now the larger tooltips flash off and on until I make them smaller. I put one of my larger tips in tooltip.prg sample and same thing flashing.

Any Idea whats going on?

Thank you

Harvey
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
change tooltips..how?
Posted: Mon Aug 11, 2008 10:35 PM
Besides the previous msg info, in order to change the default tooltip width, this change is required in source\classes\window.prg:

#define TTM_SETMAXTIPWIDTH   (WM_USER + 24)

...
hWnd = CreateToolTip( ... )

SendMessage( hWnd, TTM_SETMAXTIPWIDTH, 0, <nNewLength> )
...

default nLength is 120
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
change tooltips..how?
Posted: Mon Aug 11, 2008 10:36 PM

Harvey,

Do you mean the tooltip width or the amount of text that it shows ?

Whats the Len() of your used tooltip text ?

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
change tooltips..how?
Posted: Mon Aug 11, 2008 10:43 PM
Harvey,

2. In order to change the time that the tooltip is shows, similar changes in source\classes\window.prg are required:
#define TTM_SETDELAYTIME        (WM_USER + 3)
#define TTDT_AUTOPOP  2
... 
hWnd = CreateToolTip( ... ) 

SendMessageDelay( hWnd, TTM_SETDELAYTIME, TTDT_AUTOPOP, 32767 )
...

You can try values between 1 and 32767
regards, saludos

Antonio Linares
www.fivetechsoft.com

Continue the discussion