super tooltip - multi instances

hello,
i use the super tooltip in the syncfusion bar item.
i use it to explain the user why the bar item is sometime disabled.
there are 2 reasons for disabling the baritem.
i put the first reason, using the tooltip info class, SetTooltip method, everything is OK.
after that i put the 2nd reason, using another tooltip info instance, and now i see them BOTH , one on top of the other.
i tried 'hide' method, it doesnt work. there is no 'clear' method for the super tooltip.

what can i do ?
thanx,
Noa

1 Reply

KM Kathiresan M Syncfusion Team July 13, 2009 04:30 PM UTC

Hi,

No need to create a new TooltipInfo to set the new value, instead get the already created ToolTipInfo of the respective control and modify it with the new content and reassign it it back to the control.

It's possible to do it as illustrated below,

public Form1()
{
InitializeComponent();
ToolTipInfo info = new ToolTipInfo();
info.Body.Text = "Initial Assignment";
this.superToolTip1.SetToolTip(this.button1, info);
}

private void button1_Click(object sender, EventArgs e)
{
ToolTipInfo info = this.superToolTip1.GetToolTip(this.button1);
info.Body.Text = "Modified in Button Click";
this.superToolTip1.SetToolTip(this.button1,info);
}

-Kathir

Loader.
Up arrow icon