Heiko3110 Posted November 26, 2015 Posted November 26, 2015 (edited) Hello, Im still working on my first Little Script and came across another issue:I created a little ToolTopGlobal $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 functionAdlibRegister ( "_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 youHeiko Edited November 26, 2015 by Heiko3110
Kovacic Posted December 8, 2015 Posted December 8, 2015 Try something like this right before calling the write to toolip.. If $ToolTipText == $last then return $ToolTipText = $last _GUIToolTip_UpdateTipText($hToolTip, $gui, $hLogo, $ToolTipText) This way it will only update the tooltip if the text has changed, C0d3 is P0etry( ͡° ͜ʖ ͡°)
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now