Showing tooltip on Mouse move

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
Srinib
LVL 1
srinibAsked:
Who is Participating?
 
diasroshanConnect With a Mentor Commented:
hi,


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
else
      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...

Cheers,
Rosh
0
 
srinibAuthor Commented:
not working.
0
 
diasroshanCommented:
Hi,

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...

Cheers,
Rosh
0
 
srinibAuthor Commented:
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.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.