I am using the row.Row.RowError to show a message the visual aid and a tooltip for specific conditions. The problem my users have with this, is that the tool tip is only displayed if they put the mouse exactly over the red indicator, but it is not displayed if the mouse is over any other part of the gray area of the row selector. Is is possible to have it displayed no matter where the mouse is in the cell?
I was trying a second option that was remove the RowError, put the row selector i red (I already have this) but I don't know how to display a custom tooltip that only shows in the row selector, I tried with e.Row.ToolTipText, but the tooltip displays in all the cells for the row, I need it only in the row selector.
Hi,
There's a sample that demonstrates how to apply a tooltip to a part of a control based on UIElements. The sample is called "ToolTips with Context CS" (or "ToolTips with Context VB"). If you chose to install the samples, it will be under the Legacy samples.
The way the sample works is there's a base class that handles a lot of the work for you, dealing with the mouse entering and exiting elements. And then you just create a class derived from this base class and override a couple of methods to do what you want to do and identify the elements and tooltips you want.
In this case, there's no way to turn turn off the DataErrorIcon tooltips in the grid separately from the actual icons. So what I would recommend is turning off SupportDataErrorInfo and then indicating the error in some other way, like applying an appearance to the RowSelector in the InitializeRow event. I think you mentioned that you did this by making the RowSelectors red.
Then you can use the sample as a guide to showing the tooltip.
I whipped up a quick sample to demonstrate this and I have attached it here.
RowSelectorTooltips.zip
Hello
So I am getting a little closer, I have this code now:
Private Sub UltraGrid1_MouseEnterElement(sender As Object, e As UIElementEventArgs) Handles TrackingScreenResults.MouseEnterElement
If (TypeOf e.Element Is RowSelectorUIElement) Then
Dim currentElement As UIElement = e.Element
Dim currentRow As UltraGridRow = currentElement.GetContext(GetType(UltraWinGrid.UltraGridRow))
If Not currentRow Is Nothing Then
MessageBox.Show("My tool tip message")
End If
End Sub
How Can I replace MessageBox with a tooltip?
Thank you Andrew, thank you for your answer, I already saw that tread, but based on my basic knowledge of Infragistic, that tread says nothing to me.
Could you give me more information or point me to other documentation that could have more details?
Hello Jose,
Thank you for your post!
In order to place a tooltip on the RowSelector, I would recommend taking a look at this forum thread, where this was already addressed.
Please let me know if you have any other questions or concerns on this matter.