Hallo zusammen,
ich habe mich ein wenig an dem "MouseoverTooltip" von chrisatack versucht. Zusätzlich habe ich noch 3 ItemTabs eingefügt inkl. Buttons.
Nun ist es leider so das die "Tooltips" aller Button (auch bei nicht aktivem Tab) angezeigt werden solbald die Mouse die Koordinaten erreicht.
Es soll aber nur den "Tooltip" des jeweiligen Tabs anzeigen....ist das möglich ??
Spoiler anzeigen
#include <GUIConstants.au3>
$wintitel = "Form1"
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 400,400)
GuiCtrlCreateTab(5, 5, 380, 380)
GuiCtrlCreateTabItem("Tab 1")
$Button1 = GUICtrlCreateButton("exit", 10, 100, 61, 31, 0)
GuiCtrlCreateTabItem("Tab 2")
$Button2 = GUICtrlCreateButton("exit", 100, 100, 61, 31, 0)
GuiCtrlCreateTabItem("Tab 2")
$Button2 = GUICtrlCreateButton("exit", 200, 100, 61, 31, 0)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
Exit
EndSwitch
_Tooltip()
Sleep(10)
WEnd
Func _MouseOver($_mo_x, $_mo_y, $_mo_width, $_mo_height)
If WinActive($wintitel) = 1 Then ; WICHTIG!!!!! NUR WENN DAS FENSTER AKTIV IST MOUSOVER PRÜFEN
$_mo_pos = GUIGetCursorInfo()
If ($_mo_pos[0] > $_mo_x) and ($_mo_pos[0] < $_mo_x + $_mo_width) and ($_mo_pos[1] > $_mo_y) and ($_mo_pos[1] < $_mo_y + $_mo_height) Then
Return 1
Else
Return 0
EndIf
EndIf
EndFunc
Func _Tooltip()
$tooltip_sleep = '50'
;Spieler1-----------------------------------------------------------------------------
If _MouseOver(10, 100, 61, 31) = 1 Then
Do
ToolTip ("Button Tab 1",Default,Default,'Test1',1)
Sleep($tooltip_sleep)
Until _MouseOver(10, 100, 61, 31) = 0
ToolTip('')
EndIf
;Name2-----------------------------------------------------------------------------
If _MouseOver(100, 100, 61, 31) = 1 Then
Do
ToolTip ("Button Tab 2",Default,Default,'Test 2',1)
Sleep($tooltip_sleep)
Until _MouseOver(100, 100, 61, 31) = 0
ToolTip('')
EndIf
;Name3-----------------------------------------------------------------------------
If _MouseOver(200, 100, 61, 31) = 1 Then
Do
ToolTip ("Button Tab 3",Default,Default,'Test 3',1)
Sleep($tooltip_sleep)
Until _MouseOver(200, 100, 61, 31) = 0
ToolTip('')
EndIf
EndFunc