Is there away to adjust the timing of tooltips?
Use FWH909.
Harvey
Is there away to adjust the timing of tooltips?
Use FWH909.
Harvey,
Try oWnd:nToolTip.
James
Thanks James:
Not sure where to put it and is it to be set to a time oWnd:ntooltip := ???
Harvey,
OK, I should have explained. nTooltip is CLASSDATA of TWindow. This means that it is like a STATIC. All instances of TWindow and any instances of subclasses of TWindow will inherit this instance variable AND and its value. So you only have to set it once in your app. nTooltip defaults to 900 milliseconds.
Remember that most controls inherit from TWindow via TControl, so all those controls will have the overridden nTooltip value.
Example:
define window oWnd title "Main Window"
oWnd:nTooltip:= 1000
Or you can use this unsual syntax:
TWindow():nTooltip := 1000
Now your toolbar, GETs, etc, will have the longer time.
Regards,
James
DEFINE FONT oFont1 NAME "tahoma" SIZE 0,-11 BOLD
DEFINE WINDOW OWND1 FROM 1, 5 TO 20, 75 ;
TITLE "Up Your Cash Flow XT2-2009" ;
MENU( BUILDMENU()) ;
COLOR CLR_WHITE, CLR_BLUE
oWnd1:nTooltip := 1000Harvey,
After looking at the code, it appears that nTooltips is only being used with Clipper. I am going to have to look at this more when I have time.
James
hWnd = CreateToolTip( Self:hWnd, If( ValType( cToolTip ) == "A", cToolTip[ 1 ], cToolTip ), ;
If( ::lBalloon != nil, ::lBalloon, lTTBalloon ) )
if ValType( cToolTip ) == "A"
if Len( cToolTip ) > 1
if ! Empty ( cToolTip[ 2 ] )
SendMessage( hWnd, TTM_SETTITLE, ;
If( Len( cToolTip ) > 2 .and. ! Empty( cToolTip[ 3 ] ), ;
cToolTip[ 3 ], TTI_INFO ), cToolTip[ 2 ] )
endif
...Antonio:
Read the information you sent looked at the code. Looked at window.prg and I cant seem to figure out what to do. ![]()
Harvey,
That was not a solution, just the section of code where the solution needs to go.
Antonio was requesting feedback on any other properties that we might want to also add at the same time as the timing fix. I haven't looked at the docs yet.
James
if ValType( cToolTip ) == "A"
if Len( cToolTip ) > 1
if ! Empty ( cToolTip[ 2 ] )
SendMessage( hWnd, TTM_SETTITLE, ;
If( Len( cToolTip ) > 2 .and. ! Empty( cToolTip[ 3 ] ), ;
cToolTip[ 3 ], TTI_INFO ), cToolTip[ 2 ] )
endif
if Len( cToolTip ) > 3
if ValType( cToolTip[ 4 ] ) == "N"
SendMessage( hWnd, TTM_SETTIPTEXTCOLOR, cToolTip[ 4 ], 0 )
endif
if Len( cToolTip ) > 4
if ValType( cToolTip[ 5 ] ) == "N"
SendMessage( hWnd, TTM_SETTIPBKCOLOR, cToolTip[ 5 ], 0 )
endif
endif
endif
endif
endifSendMessage( hWnd, TTM_SETDELAYTIME, TTDT_AUTOPOP, nMakeLong( 6000, 0 ) )Antonio:
Doesnt work
I need to define the ttm_setdelaytime
I placed SendMessage( hWnd, TTM_SETDELAYTIME, TTDT_AUTOPOP, nMakeLong( 6000, 0 ) )
below the endif in the array if endif statement. Nothing happens
BUT If I set #define TTM_SETDELAYTIME (WM_USER +24) the ToolTip looks much better better but no time change or time control.
Thanks again for the help but so far not working.
Harvey,
Those values are defined in c:\bcc55\include\commctrl.h
Perfect. Thanks for the help