Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 3187
  • Last Modified:

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
0
srinib
Asked:
srinib
  • 2
  • 2
1 Solution
 
diasroshanCommented:
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

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now