Add onmouseover event in links rendered in C#.net webbrowser control
My task is to highlight selected words rendered in html in webbrowser control of C#.net. I accomplish it by using IHtmldocument2. (ref: http://www.codewrecks.com/blog/index.php/2009/02/13/highlight-words-in-webbrowser-control/).
Now, my next task is when i mouseover on the highlighted text, a custom popup will appear to show some开发者_JAVA百科 information about that highlighted text. It serves like a tooltip. How can i do this? can you give me some sample codes?Help Please
Thanks
I suggest jQuery here are some tutorials for popups http://speckyboy.com/2009/09/16/25-useful-jquery-tooltip-plugins-and-tutorials/. In the control/function that highlight the words you should be able to set the attributes needed for jQuery to show popups.
what i did with this is just create a div and insert it in the body section. i created a javascript that sets the position property of that div to absolute and with just simple coordinates, i set the top and left property of the div to the position of the element being hover on.
精彩评论