When the cell text is too long to fit in the area given in the grid a pop up or tooltip is shown. We have some fields with a lot of text and it shows for about 5 seconds; I need to change this length of time and extend itbut cannot find any reference to changing this length of time? I feel there should be a universal setting for sure but am unable to find one. Any help is greatly appreciated.
Thanks,
Eric
Hello Eric,
You could do this by turning off the default tooltips for the cells and use our 'WinToolTipManager' component to create your own tooltips. Please review the sample attached to this post and see if it meets your requirements. Please feel free to let me know if I misunderstood you or if you have any other questions.
Thank you, I believe I can make this work for my requirements.
Something else that might now be able to be accomplished: The row.description is also sometimes too long. I'm not familiar enough with the UI hierarchy to know the elements when MouseEnterElement fires; can someone provide the code to accomplish showing the row description when entered?
Something like the following but this doesn't always work:
If e.Element.GetAncestor(GetType(RowUIElement)) IsNot Nothing Then If e.Element.GetType Is GetType(RowUIElement) Then ToolTipInfo.ToolTipText = DirectCast(e.Element, Infragistics.Win.UltraWinGrid.RowUIElement).Row.Description UltraToolTipManager1.SetUltraToolTip(UltraGrid1, ToolTipInfo) UltraToolTipManager1.ShowToolTip(UltraGrid1) End If
Thank you, this enabled me to catch appropriate elements and properly show (and not hide) for the row descriptions.
ElseIf e.Element.GetAncestor(GetType(RowUIElement)) IsNot Nothing Then If e.Element.GetType Is GetType(RowAutoPreviewUIElement) Then ToolTipInfo.ToolTipTitle = "Row Warnings" ToolTipInfo.ToolTipText = DirectCast(e.Element, Infragistics.Win.UltraWinGrid.RowAutoPreviewUIElement).Row.Description UltraToolTipManager1.SetUltraToolTip(UltraGrid1, ToolTipInfo) UltraToolTipManager1.ShowToolTip(UltraGrid1) End If
I'm now having a problem where the UltraDropDown popups are showing as well (in addition to the UltraTooTipManager tips). With this being my first use of this class, help would be appreciated again for the steps to stop showing/suppressing these ultraDropDown tooltips also.
Thanks in advance,
I was able to disable the built-in/default grid tooltips by:
ultraGrid1.DisplayLayout.Override.TipStyleCell = TipStyle.Hide
Hi, I have one query regarding the same, the default tooltip appears in grid ,only when the cell text is completly not visible. Is it possible to make the tooltip manager's behaviour also same as that of the existing Typstyle?.Because when add tooltip manager it is appearing for each and every cell even it is completely visible to read.
Hi,
The editor element in the cell keeps track of whether or not the data fits within the available space. So you would have to get the UIElement in order to determine whether or not to show the tooltip. Presumably you are changing the tooltip based on the mouse position over the grid, so you are probably using either MouseDown or MouseMove. Here's an example of how you might go about this:
private void ultraGrid1_MouseMove(object sender, MouseEventArgs e) { var grid = (UltraGrid)sender; var lastElementEntered = grid.DisplayLayout.UIElement.LastElementEntered; if (null == lastElementEntered) return; var embeddableUIElementBase = lastElementEntered as EmbeddableUIElementBase; if (null == embeddableUIElementBase) embeddableUIElementBase = lastElementEntered.GetAncestor(typeof(EmbeddableUIElementBase)) as EmbeddableUIElementBase; if (null == embeddableUIElementBase) return; Debug.WriteLine(embeddableUIElementBase.IsDataFullyVisible); }
Thanks a lot Mike