Hi Sandiliya,
Thank you for your update.
1) Displaying hourglass cursor with toolips when loading the TreeNodeAdv:
We can display the hourglass cursor and tooltips when loading the TreeNodeAdv. Please refer to the sample and the code snippet given below that illustrates this:
// When Processing
private void timer1_Tick(object sender, EventArgs e)
{
Cursor.Current = Cursors.WaitCursor;
this.toolTip1.SetToolTip(this.treeViewAdv1, "Processing......!");
TreeNodeAdv treenode = new TreeNodeAdv("Node");
this.treeViewAdv1.Nodes.Add(treenode);
Thread.Sleep(5000); // wait for a while
}
// After process over
private void button1_Click(object sender, EventArgs e)
{
this.timer1.Stop();
this.toolTip1.SetToolTip(this.treeViewAdv1, "Processed......!");
Cursor.Current = Cursors.Arrow;
}
Sample :
http://websamples.syncfusion.com/samples/Tools.Windows/F79472/main.htm2) Need to display tooltips until MouseHovers on the value of the DataBoundGrid:
Please find the following code handled in MouseMove event as this displays the tooltip until the user leaves hovering the cell.
int row1 = -1;
int col1 = -1;
void gridDataBoundGrid1_MouseMove(object sender, MouseEventArgs e)
{
int row, col;
if (this.gridDataBoundGrid1.PointToRowCol(new Point(e.X, e.Y), out row, out col))
{
if ((col1!=col||row1!=row)&& this.toolTip1 != null && this.toolTip1.Active)
this.toolTip1.Active = false;
col1 = col;
row1 = row;
Graphics g = CreateGraphics();
GridStyleInfo style = this.gridDataBoundGrid1[row, col];
if (this.gridDataBoundGrid1.Model .ColWidths[col] - style.TextMargins.Left - style.TextMargins.Right
< g.MeasureString(style.Text, style.GdipFont).Width)
{
toolTip1.SetToolTip(this.gridDataBoundGrid1, this.gridDataBoundGrid1[row1, col1].Text);
toolTip1.Active = true;
}
g.Dispose();
}
}
Please let me know if any concerns.
Regards,
Fathima