i have a script with:
1. Buttons (3)
2. ListView (1)
the script using a function that gives you a ToolTip (msg) when your Mouse cursor over only on the Buttons (each button returns its name).
However my question is if i can get the SAME for the items of the ListView ?
so i'll get for each item (LV_Add) a ToolTip with its name.
Thanks in advance!
Code: Select all
Gui, Add, Button,, Over your mouse here 1 - works! :)
Gui, Add, Button,, Over your mouse here 2 - works@ :)
Gui, Add, Button,, Over your mouse here 3 - works# :)
Gui Add, ListView,, test
LV_Add("" 1, "Over your mouse here 1 - doesnt works! :(")
LV_Add("" 2, "Over your mouse here 2@ - doesnt works! :(")
LV_Add("" 3, "Over your mouse here 3# - doesnt works! :(")
Gui, Show,,
hCurs:=DllCall("LoadCursor","UInt",NULL,"Int",32649,"UInt") ;IDC_HAND
OnMessage(0x200,"WM_MOUSEMOVE")
Return
WM_MOUSEMOVE(wParam, lParam, Msg)
{
ControlGetText, TXT_1, Button1
ControlGetText, TXT_2, Button2
ControlGetText, TXT_3, Button3
MouseGetPos,,,,ctrl
If ctrl in Button1
{
ToolTip, %TXT_1%
}
else
If ctrl in Button2
{
ToolTip, %TXT_2%
}
else
If ctrl in Button3
{
ToolTip, %TXT_3%
}
else
{
ToolTip
}
}