I have ToolTips turned on to display when a user hovers over a text box. Currently the tooltip's display position seems to be based on where my mouse pointer is on the text box.
Is there a way to always set the tooltip position to a specified point regardless of the mouse pointer's position when hovering over the text box? For example, I always want the tooltip position to be in the upper left corner of the text box regardless of where the mouse pointer is hovering on the text box.
Thanks
Bill
Below is actual code from a short demo I created when discussing a tooltip bug with the development team. Try creating a form with a button btToolTip whose Click event would trigger this method:
private void btToolTip_Click(object sender, EventArgs e) { Infragistics.Win.ToolTip tt = new Infragistics.Win.ToolTip(this); tt.ToolTipTitle = "Tooltip Title"; tt.ToolTipText = "Tooltip text"; tt.Show(this.RectangleToScreen(new Rectangle(50, 120, 100, 100))); }
I have been trying to use the .show method as described above, but my tooltip balloon always locates at x-position "0".
That is, it always locates at the left edge of my screen. Can you tell me why this is happening?
Thanks,
Dan
A quick update for those who might be interested:
The best solution is not to use UltraToolTipManager, but manually instantiate ToolTip class and call one of its Show() overloads as shown in the code snippet:
Infragistics.Win.ToolTip tt = new Infragistics.Win.ToolTip(this.ultraGrid1);
tt.ToolTipImage = ToolTipImage.Warning;
tt.ToolTipTitle = "Tool Tip Title";
tt.ToolTipText = "This is a very long tool tip text This is a very long tool tip text This is a very long tool tip text This is a very long tool tip text ";
tt.Show(new Rectangle(Control.MousePosition.X, Control.MousePosition.Y, 100, 100));
Remember to use ToolTip class, not UltraToolTip which does not exist...
Big thanks to Jason from Infragistics Team for his support.
Ralph
Unfortunately none of ShowToolTip overrides takes Size or Rect, I had checked it before.
It seems the only thing I can do now is to cut the string manually and submit a feature request.
I'm not sure. Check the overloads of the ShowToolTipMethod and see if any of the take a Size or a Rect or maybe a Maximum Width.
If not, then maybe you can insert line breaks into your text to make it wrap.
If that still doesn't work (or even if it does), you should probably submit a feature request to Infragistics. Request a Feature or Component