Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
560
OptionSet Items
posted

Is there a way to add ToolTips to the items in the OptionSet with the ToolTipManager? I didnt see any examples in the samples folder? Using vb.net..

Thanks

  • 37774
    posted

    No, I do not think there is a way to manually show a tooltip per item in the UltraOptionSet.  You might be able to get around showing your own tooltip, though, but you'd have to get the relevant information from the UIElements and the mouse cursor.  Your code might look like the following:

         Private Sub UltraOptionSet1_MouseHover(ByVal sender As Object, ByVal e As System.EventArgs) Handles UltraOptionSet1.MouseHover
            Dim point As Point = Me.UltraOptionSet1.PointToClient(Cursor.Position)
            Dim element As Infragistics.Win.UIElement = Me.UltraOptionSet1.UIElement.ElementFromPoint(point)
            If Not element Is Nothing Then
                Dim optionItem As Infragistics.Win.ValueListItem
                optionItem = element.GetContext(GetType(Infragistics.Win.ValueListItem))
                If Not optionItem Is Nothing Then
                    'Show a tooltip based on the optionItem.DisplayText or DataValue
                End If
            End If
        End Sub

    -Matt