cappy2112 Posted January 10, 2006 Posted January 10, 2006 Has anyone implemented a "traditional tooltip"- that is, when the mouse is over a certain control, a tooltip is displayed until the mouse is ,moved off of the control, or the tooltip timer expires. This would require MouseOver functionality for a control, which I haven't been able to find either.
Valuater Posted January 10, 2006 Posted January 10, 2006 hows about #include <GUIConstants.au3> #include <Date.au3> GUICreate("MY GUI") $Button_1 = GUICtrlCreateButton("Select", 10, 50, 50, 20) GUICtrlSetTip( -1, "Select button") $Button_2 = GUICtrlCreateButton("Exit", 60, 50, 50, 20) GUICtrlSetTip( -1, "Exit button") $Label_4 = GUICtrlCreateLabel("Mouse over any control", 10, 10, 400, 30) GUICtrlSetTip( -1, "Label Message") GUISetState() While 1 $msg = GUIGetMsg() Select Case $msg = $Button_1 MsgBox(64,"Mouse over","this is a mouse over control test") Case $msg = $GUI_EVENT_CLOSE Or $msg = $Button_2 Exit EndSelect WEnd 8) Tony4219 1
John Posted January 10, 2006 Posted January 10, 2006 Has anyone implemented a "traditional tooltip"- that is, when the mouse is over a certain control, a tooltip is displayed until the mouse is ,moved off of the control, or the tooltip timer expires.This would require MouseOver functionality for a control, which I haven't been able to find either.Yes like this...#include <GuiConstants.au3>Opt("GUIOnEventMode", 1)$gui=GuiCreate("Task Drawer", 150, 150, 150, 150, $WS_POPUP, $WS_EX_TOPMOST)GUISetBkColor (0x660000)$lbl = GUICtrlCreateLabel("Tool tip here", 3, 0, 150, 20, $SS_CENTER, $SS_NOTIFY)GUICtrlSetBkColor ( $lbl, 0x3399CC)GUICtrlSetFont ($lbl, 10, 600, "", "Arial Bold")GUICtrlSetColor ( $lbl, 0x660000)GUICtrlSetOnEvent($lbl, "Exitit")GUICtrlSetTip($lbl, "Click here to exit" )GuiSetState()While 1 Sleep(10)WEndFunc Exitit() ExitEndFunc
cappy2112 Posted January 10, 2006 Author Posted January 10, 2006 hows about #include <GUIConstants.au3> #include <Date.au3> GUICreate("MY GUI") $Button_1 = GUICtrlCreateButton("Select", 10, 50, 50, 20) GUICtrlSetTip( -1, "Select button") $Button_2 = GUICtrlCreateButton("Exit", 60, 50, 50, 20) GUICtrlSetTip( -1, "Exit button") $Label_4 = GUICtrlCreateLabel("Mouse over any control", 10, 10, 400, 30) GUICtrlSetTip( -1, "Label Message") GUISetState() While 1 $msg = GUIGetMsg() Select Case $msg = $Button_1 MsgBox(64,"Mouse over","this is a mouse over control test") Case $msg = $GUI_EVENT_CLOSE Or $msg = $Button_2 Exit EndSelect WEnd 8) Great Thanks. If these APIS were named Tooltip, as they should be, the search through the helpfile woul d have returned something other than ToolTip()
cappy2112 Posted January 10, 2006 Author Posted January 10, 2006 Yes like this...#include <GuiConstants.au3>Opt("GUIOnEventMode", 1)$gui=GuiCreate("Task Drawer", 150, 150, 150, 150, $WS_POPUP, $WS_EX_TOPMOST)GUISetBkColor (0x660000)$lbl = GUICtrlCreateLabel("Tool tip here", 3, 0, 150, 20, $SS_CENTER, $SS_NOTIFY)GUICtrlSetBkColor ( $lbl, 0x3399CC)GUICtrlSetFont ($lbl, 10, 600, "", "Arial Bold")GUICtrlSetColor ( $lbl, 0x660000)GUICtrlSetOnEvent($lbl, "Exitit")GUICtrlSetTip($lbl, "Click here to exit" )GuiSetState()While 1 Sleep(10)WEndFunc Exitit() ExitEndFuncthanks
mr.underperson Posted May 9, 2006 Posted May 9, 2006 Sadly, cappy2112's comment about the helpfile is still very much true. I searched for over an hour for this, and it's one simple built-in function! I'd already given up and started work on a "mouse coordinate matrix"! Search the helpfile for "tooltip" and this doesn't appear! When people are looking for tooptips, believe me, THIS is what they are looking for.There are LOADS of functions like that. The hours I've wasted! Can whoever works on the manual please make a note. It's not just AutoIt n00bs who's time is wasted, but those having to support them, and then there's all those potential users wandering off muttering "can't even make a simple bloody tooptip! Useless P.O.S" under their breath....The manual is good. Very good.But the indexing sucks, a lot.GUICtrlSetToolTip( -1, "My ToolTip")MUCH BETTER!-mu
CyberSlug Posted May 9, 2006 Posted May 9, 2006 I believe the indexing problem is due to the word "tooltip" never appearing in the GUICtrlSetToolTip documentation. Only "tip" appears. I'll make note of this. Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig!
mr.underperson Posted May 9, 2006 Posted May 9, 2006 Yup, that's what it is. But there are many examples of this. For instance, searching for "dns name" or "domain name", even "tcp name" (quotes for illustration, here), eventually you give up and figure that AutoIt simply can't translate names to IP addresses and perhaps begin to write a name resolution function yourself, the pain!Or wander off muttering "Can't even translate a bloody domain name..." under your breath.Oh! What's this ...TCPNameToIP()Notice that my last search example is two words which are BOTH contained within the function name ('tcp' and 'name'), and yet the result is blank. Isn't there some way to specify that the .chm search return words within bigger words?Yes, adding "tooltip" to the GUICtrlSetToolTip -No! Wait a minute, that was My version of the function name, that's what it *should* be! I really meant.. Yes, adding "tooltip" to the GUICtrlSetTip (who named that function!?!?!) page in the help would be good, but tweaking the chm so that it can return partial/fuzzy matches would probably be much more fruitful and productive.Or perhaps a "keywords" section in each help entry, stuffed with EVERY possible combination of potential search queries.-mups.. AND, function list at the very top of UDF's please guys!
mr.underperson Posted May 9, 2006 Posted May 9, 2006 I need to make a string lower case. So now I'm now searching for.. String Lower (nothing, okay, what about...) String case (nada. hmmm, okay, I'll try...) Lower case (FUCK ALL!) What a pity that AutoIt doesn't have a function to simply convert a string to lower case. I guess I'd better go and Google for an ASCII table and see if I can cook up some kind of routine to do this conversion. What a nightmare! -mu
HardCopy Posted May 10, 2006 Posted May 10, 2006 What a pity that AutoIt doesn't have a function to simply convert a string to lower case. I guess I'd better go and Google for an ASCII table and see if I can cook up some kind of routine to do this conversion. What a nightmare!-muBit it does try StringLower Contributions: UDF _DateYearFirstChildren are like Farts, you can just about stand your own.Why am I not a Vegetarian?...Well...my ancestors didn't fight & evolve to the Top of the food chain for me to survive on Salad
mr.underperson Posted May 10, 2006 Posted May 10, 2006 Too late! I discovered an old ASCII table, and have written a nice function to do the conversion. At only 600 lines of code, quite frankly it's a masterpiece, and only took four hours. No way I'm using your new function just because it's built-in! And much quicker, too. -mu
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