Showing tooltip on Mouse move

Posted on 2007-08-06
Last Modified: 2013-12-26
I have Datawindow which is non-editable. I want to show some static text when mouse is moving over a particular field.
Please give me sample code.

Thanks in advance
Question by:srinib
    LVL 18

    Accepted Solution


    heres the trick...

    place a statictext on ur window and design it like a tooltip... small with yellow background... like u wud like ur tooltip to look... make is invisible....  say the name is arg_statictext

    now give appropriate tag to ur columns and this will display in ur tooltip...

    first for ur buttons create user defined events say 'ue_mouseover' with Event ID --> pbm_mousemove

    the script for it is...

    arg_statictext.X      = <DW Control Name>.Object.<Columnname>.X
    arg_statictext.Y      = <DW Control Name>.Object.<Columnname>.Y + <DW Control Name>.Object.<Columnname>.Height + 30
    arg_statictext.Text   = '  ' + <DW Control Name>.Object.<Columnname>.Tag
    arg_statictext.width  = len(<DW Control Name>.Object.<Columnname>.Tag) * 40

    If Trim(This.tag) = "" then
          arg_statictext.visible = false
          arg_statictext.visible = true
    end if

    The above code is wat was used for buttons on a window... i have modified it for a DW... if any issues come up we could sort them out...

    Let me know if u need more assistance...

    LVL 1

    Author Comment

    not working.
    LVL 18

    Expert Comment


    like i said, ull need to make a few changes in the above code for using it within a DW...

    i have supplied the groundwork... u need to try ahead... ill help u out...

    LVL 1

    Author Comment

    Thanks it is working. Earlier there was a problem because of the datawindow enabled property is turned off, so that the mouse move event itself is not triggering. Now its working. Thanks for the help.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Threat Intelligence Starter Resources

    Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

    Suggested Solutions

    Here is a helpful source code for C++ Builder programmers that allows you to manage and manipulate HTML content from C++ code, while also handling HTML events like onclick, onmouseover, ... Some objects defined and used in this source include: …
    How to install Selenium IDE and loops for quick automated testing. Get Selenium IDE from ( Go to that link and select download selenium in the right hand columnThat will then direct you to their downlo…
    This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
    The viewer will learn how to use and create keystrokes in Netbeans IDE 8.0 for Windows.

    759 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    10 Experts available now in Live!

    Get 1:1 Help Now