Jump to content

_GUIToolTip_UpdateTipText causes flickering


Heiko3110
 Share

Recommended Posts

Hello,

 

Im still working on my first Little Script and came across another issue:I created a little ToolTop

Global $hLogo = GUICtrlGetHandle($logo)              ; Tooltip auf Logo
Local $hToolTip = _GUIToolTip_Create($hLogo, BitOR($TTS_CLOSE, $TTS_NOFADE, $TTS_ALWAYSTIP,$TTS_BALLoON))
_GUIToolTip_SetMaxTipWidth($hToolTip, 350)
_GUIToolTip_SetDelayTime($hToolTip, $TTDT_INITIAL, 1500)
_GUIToolTip_SetDelayTime($hToolTip, $TTDT_AUTOPOP, 30000)
_GUIToolTip_AddTool($hToolTip, $gui, "", $hLogo)

 

The Text of the ToolTip is updated every Second, which I do with "Adlibregister" a Little function

AdlibRegister ( "_UpdateToolTip" , 1000 ) ; Live Tooltip

Func _UpdateToolTip()

    $ToolTipText = "Verbundene Hosts:" & @CR

    For $i = 0 To UBound($TCPConnectionTable) - 1
        $TimeStamp=_FormatTime($TCPConnectionTable[$i][2])
        $ToolTipText &= $TCPConnectionTable[$i][0] & ":" & $TCPConnectionTable[$i][1] & " (Verbunden seit "& $TimeStamp &")"  & @CR

    Next

    _GUIToolTip_UpdateTipText($hToolTip, $gui, $hLogo, $ToolTipText)

EndFunc   ;==>_UpdateToolTip

..basically it is working, but every time the ToolTip is visible and updated the whole Text is flickering. However if I set the Adlib Intervall to e.g. 100ms the flickering is gone. But I dont want to produce unnecessary CPU Loads. I just display a simple clock in the Tooltip along with some other Text, so 1000ms is fine.

 

Does anybody know how to update the ToolTip once per second, but without flckering ?

 

Thank you

Heiko

 

 

 

Edited by Heiko3110
Link to comment
Share on other sites

  • 2 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...