Show Tooltip

2 posts, 0 answers
  1. Shirya
    Shirya avatar
    40 posts
    Member since:
    Sep 2008

    Posted 16 Jan 2009 Link to this post

    Hello,
    I would like my application to show every tooltip  when i click on a button.
    i have a combobox, a button in my radmenuButtonItem and a radButton for example.
    When i click on a button "Show ToolTip", I would like to show all the toolTips
    And if i click once again on my button, it hide them all.

    i try this, but it does not work:
     Public Sub ShowToolTips() 
      radButton1.RootElement.ToolTipText = "radButton1 toolTip" 
      radButton1.RootElement.AutoToolTip = True 
     
      radMenuButtonItem1.ToolTipText = "radMenuButtonItem1 toolTip" 
      radMenuButtonItem1.AutoToolTip = True 
     
      radComboBox1.RootElement.AutoToolTip = True 
      radComboBox1.RootElement.ToolTipText = "radComboBox1 toolTip" 
    End Sub() 
     
    could you help me
    Thank you
    Shirya


  2. Nick
    Admin
    Nick avatar
    767 posts

    Posted 20 Jan 2009 Link to this post

    Hello Shirya,

    Thank you for your inquiry.

    We do not support this scenario - multiple tooltips are shown concurrently - so you cannot implement it using our tooltips. You may create your own custom solution though. For instance you can use the standard tooltips or the Form class if you want more advance scenarios (display multiple small borderless forms). Please refer to the sample solution using the regular ToolTips:
    Public Class Form1  
        Private offsetX As Integer = 35  
        Private offsetY As Integer = 50  
        Private toolTip1 As ToolTip = New ToolTip()  
        Private toolTip2 As ToolTip = New ToolTip()  
     
        Public Sub New()  
            InitializeComponent()  
     
            AddHandler radButton1.MouseDown, AddressOf radButton1_MouseDown  
            AddHandler radButton2.MouseDown, AddressOf radButton2_MouseDown  
        End Sub 
     
        Private Sub radButton1_MouseDown(ByVal sender As ObjectByVal e As MouseEventArgs)  
            toolTip1.Hide(Me)  
            toolTip2.Hide(Me)  
        End Sub 
     
        Private Sub radButton2_MouseDown(ByVal sender As ObjectByVal e As MouseEventArgs)  
            toolTip1.Show("ToolTip1 for RadButton1"MeMe.radButton1.Location.X + offsetX, Me.radButton1.Location.Y + offsetY, 5000000)  
            toolTip2.Show("ToolTip2 for RadButton2"MeMe.radButton2.Location.X + offsetX, Me.radButton2.Location.Y + offsetY, 5000000)  
        End Sub 
    End Class 

    Please note that you should custom layout the tooltips since they can overlap each other depending on the layout of the controls.

    Do not hesitate to write me back if you have more questions.

    Sincerely yours,
    Nick
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Back to Top