Jump to content
Luigi

Help with GuiToolTip

Recommended Posts

Luigi

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 by Luigi

Visit my repository

Share this post


Link to post
Share on other sites
water

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 (2018-06-01 - Version 1.4.9.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2018-09-01 - Version 1.3.4.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

Share this post


Link to post
Share on other sites
GordonFreeman

#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
WEnd

I Prefer this than other way

Share this post


Link to post
Share on other sites
Luigi

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

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

×