We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Regarding Hourglass

Thread ID:

Created:

Updated:

Platform:

Replies:

79472 Feb 11,2009 04:56 AM UTC Feb 19,2009 01:36 PM UTC WinForms 7
loading
Tags: Tools
Administrator [Syncfusion]
Asked On February 11, 2009 04:56 AM UTC

How can i set tool tip to Hourglass?
is it possible?


Fathima Shalini P [Syncfusion]
Replied On February 12, 2009 12:30 PM UTC

Hi Sandiliya,

Thank you for your interest in Syncfusion Products.

I am not much clear with your requirement. If your intention is to display tooltips to the HourGlass cursor, currently it is not possible to display tooltips for a cursor. Tooltips can be set to the controls alone.

If I have misunderstood your requirement, could you please let me know in detail of your requirement so that I could work out in depth and provide you a better solution at the earliest?

Please let me know if any concerns.

Regards,
Fathima


Administrator [Syncfusion]
Replied On February 13, 2009 03:59 AM UTC

Hi Fathima,

My requirement is,

1). I am showing some values from server into client in a TreeView Control.
When i am fetching bulk records from server I need to show a hourglass cursor with a tooltip message like "Retreving records please wait......" .
How to achieve that?

2). when mouse is hovered over a partially displayed value in DataBoundGrid it displays a tooltip for few seconds and goes away. But i need to display tooltip till mousehovers on that value. I tried by setting
"ShowAlways" property value to true but doesn't works.
I am not using super tooltip.



Fathima Shalini P [Syncfusion]
Replied On February 13, 2009 10:41 AM UTC

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.htm

2) 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






Administrator [Syncfusion]
Replied On February 16, 2009 06:33 AM UTC

Hi,

Thanks for the reply.
Regarding (2) point, it is displaying tooltip irrespective of time it is fine, but tooltip is flicked while it is displaying.

What do I do, to show tooltip without flickering irrespective of time.

Please find the attached document and make required changes i.e. show tooltip without flickering.

-Thanks
Sandiliya.



ToolTip App_b0565fc3.zip

Rajadurai C [Syncfusion]
Replied On February 17, 2009 12:10 PM UTC

Hi Sandiliya,

Please try handling ActivateToolTip event instead of MouseMove event with the following code.

this.gridDataBoundGrid1.ActivateToolTip += new GridActivateToolTipEventHandler(gridDataBoundGrid1_ActivateToolTip);

void gridDataBoundGrid1_ActivateToolTip(object sender, GridActivateToolTipEventArgs e)
{
string s = e.Style.Text;
Graphics g = CreateGraphics();
GridStyleInfo style = this.gridDataBoundGrid1[e.RowIndex, e.ColIndex];
if (!(this.gridDataBoundGrid1.Model.ColWidths[e.ColIndex] - style.TextMargins.Left - style.TextMargins.Right
> g.MeasureString(style.Text, style.GdipFont).Width))
{
this.gridDataBoundGrid1.CellToolTip.SetToolTip(this.gridDataBoundGrid1, s);
this.gridDataBoundGrid1.CellToolTip.AutoPopDelay = 1000000;
this.gridDataBoundGrid1.CellToolTip.Active = true;
}
e.Cancel = true;
}


With the property AutoPopDelay, you can set how long the cell tip should persist on pointing the mouse in the same point.

Regards,
Rajadurai


sai kumar
Replied On February 18, 2009 12:40 PM UTC

Hi,

It is showing the tooltip just for more seconds only(ie, to 15 or 17 seconds) not until the control has focus.

How to show tooltip till my control has focus?


Rajadurai C [Syncfusion]
Replied On February 19, 2009 01:36 PM UTC

Hi Sandiliya,

The code provided with MouseMove event solves the issue. The flickering occurs due to the refresh of tooltip based on AutoPopDelay property value set. Please try setting this property in such a way such that you can extend time to some extent from tooltip getting refreshed but cannot be avoided. On attaining final value each time, the tooltip get refreshed.

Please let me know if you have any further concerns.

Regards,
Rajadurai


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;