change tooltips..how?

change tooltips..how?

Postby hag » Mon Aug 11, 2008 9:27 pm

I would like to change size and time tooltip appears. How would I do this?
Thank you
Harvey
hag
 
Posts: 598
Joined: Tue Apr 15, 2008 4:51 pm
Location: LOs Angeles, California

Postby Antonio Linares » 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
User avatar
Antonio Linares
Site Admin
 
Posts: 42110
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby hag » 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
hag
 
Posts: 598
Joined: Tue Apr 15, 2008 4:51 pm
Location: LOs Angeles, California

Postby Antonio Linares » 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:

Code: Select all  Expand view  RUN
#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
User avatar
Antonio Linares
Site Admin
 
Posts: 42110
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby Antonio Linares » 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
User avatar
Antonio Linares
Site Admin
 
Posts: 42110
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby Antonio Linares » 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:
Code: Select all  Expand view  RUN
#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
User avatar
Antonio Linares
Site Admin
 
Posts: 42110
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 60 guests