Luigi Posted May 2, 2015 Posted May 2, 2015 (edited) Hi folks!I write a UDF to make easy build a fields.With one func a write a Input field with label (above) and a tip (to describe this function field).Have one problem, the tip's GuiToolTip does not appear/showed.Run example and put your mouse above the input field, I expected see the GuiToolTip, but it not show.sText is showed [ok], sInput is showed [ok], sTip does not appear [error].I write the function return and no errors, everything is write.Some one can help me?Best regards, Luigi FieldPlus.au3 teste_0.au3 Edited May 2, 2015 by Luigi Visit my repository
water Posted May 2, 2015 Posted May 2, 2015 You hae no error checking in your UDF. If any of the functions called by your UDF fails you ignore the error and keep on processing.So: Add some error checking and see what happens. My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki
GordonFreeman Posted May 2, 2015 Posted May 2, 2015 #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("Form1", 615, 438, 192, 124) GUICtrlCreateInput("",100,100,100,25) GUICtrlCreateIcon("shell32.dll",-278,202,109,16,16) GUICtrlSetTip(-1,"Put your credit card number here and trust we!","Your Credit Card Number") GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEndI Prefer this than other way Frabjous Installation
Luigi Posted May 2, 2015 Author Posted May 2, 2015 I found the error:$hTip = _GUIToolTip_AddTool($_hFieldPlus_ToolTip1, $_hFieldPlus_hGui, $sTip, GUICtrlGetHandle($hInput))I write _GUiToolTip_AddTool with $hInput only, does not work, I need GuiCtrlGetHandle($hInput) of control to work.Now, work.Thanks for help @water and @GordonFreeman Visit my repository
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