ToolTip contextsensitive

  • Thread starter Thread starter Thomas Kehl
  • Start date Start date
T

Thomas Kehl

Hi!

Is there an event which will be called, before a ToolTip of a Control will be shown?
I have binded with the SetToolTip()-Method of the ToolTip-class ToolTips to textboxes.
Now, I want to show in the ToolTip text which is contextsensitive. Now, I think, when
there will be a event before a ToolTip will be shown, i am able to replace the text
dependently of the actual context (perhaps if the user is administrator or manager or ...
there will be shown another ToolTip ...)

Can anyone help me please?

Thanks!
Thomas
 
Hi Thomas
this is no event associated with toolTip objects. however you can do
another trick working with the events of the control itself.
You can change the text associated with each control when the mouse enters
this control. To do that, for the control that you want to show the tool
tip for , write some thing like that for its mouse enter event handler.
If (admistrator ){
this.toolTip1.SetToolTip(this.button1, "click here Mr Administrator");
}else if ( Mangaer){
this.toolTip1.SetToolTip(this.button1, "click here Mr mamager");
}else {
this.toolTip1.SetToolTip(this.button1, "click here who ever you are");
}
--this way you will change the text that will apper right when the user
enter your control
 
Back
Top