c# - ToolTip MouseOver function on text in RichTextBox -
this question has answer here:
im working on code-editor (windows form) , want know how make tooltip in text 1:
sample when mousehover text "" tooltip show when mouseleave tooltip gone .or if mouseover different text, text in tooltip inside change .
just in actual code-editor.
with sample code?
tooltip1.autopopdelay = 5000; tooltip1.initialdelay = 1000; tooltip1.reshowdelay = 500; //tooltip1.showalways = true; tooltip1.tooltiptitle = "<)( text tooltip )(>"; tooltip1.usefading = true; tooltip1.useanimation = true;
anyone? pls in need .thanks .
set tooltip control want show when hovers on it:
mytooltip.show("tooltip text goes here", mybutton)
or
this.tooltip1.settooltip(this.targetcontrol, "my tool tip");
you can on demand, if want check other info:
private void checkbox1_mousehover(object sender, eventargs e) { tooltip1.show("text", checkbox1); }
update
use getcharindexfromposition
check text mouse over, , show/hide tooltip accordingly.
here example.
Comments
Post a Comment