Rishav Posted August 10, 2009 Posted August 10, 2009 (edited) Hi folksI have created a UI which has some buttons. I would love to have some balloon tooltips popup when the cursor is placed over that buttons for a sec.so far i haven't been able to do that.any help?regardsRishav#include <GUIConstantsEx.au3> #include <ButtonConstants.au3> #Include <GuiToolTip.au3> Opt('MustDeclareVars', 1) Local $button1, $buttonclose, $Main, $htool $Main=GUICreate("test", 240, 180) $button1 = GUICtrlCreateButton("1", 0, 0, 40, 40, $BS_ICON) GUICtrlSetImage(-1, "shell32.dll", 5) $htool=_GUIToolTip_Create($Main, $TTS_BALLOON ) _GUIToolTip_SetToolInfo($Main, "Fire all the damned missiles!") _GUIToolTip_Activate($htool,True) GUISetState() ; Run the GUI until the dialog is closed While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE ExitLoop Case $button1 ExitLoop EndSwitch WEnd GUIDelete() Exit Edited August 12, 2009 by Rishav
enaiman Posted August 11, 2009 Posted August 11, 2009 Why are you trying to re-invent the wheel? Read about GUICtrlSetTip #include <GUIConstantsEx.au3> #include <ButtonConstants.au3> Opt('MustDeclareVars', 1) Local $button1, $buttonclose, $Main, $htool $Main=GUICreate("test", 240, 180) $button1 = GUICtrlCreateButton("1", 0, 0, 40, 40, $BS_ICON) GUICtrlSetTip(-1, "Fire all the damned missiles!", "", 0, 1) GUICtrlSetImage(-1, "shell32.dll", 5) GUISetState() ; Run the GUI until the dialog is closed While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE ExitLoop Case $button1 ExitLoop EndSwitch WEnd GUIDelete() Exit SNMP_UDF ... for SNMPv1 and v2c so far, GetBulk and a new example script wannabe "Unbeatable" Tic-Tac-Toe Paper-Scissor-Rock ... try to beat it anyway :)
Rishav Posted August 12, 2009 Author Posted August 12, 2009 eh? wasn't trying to invent the wheel. searching for tooltips in the help file i got the UDFs, and due to a lack of examples i simply had no idea how to proceed. i was going with trial and error without much success. anyway thanks a lot.this is exactly what I wanted.
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