This is a migrated thread and some comments may be shown as answers.

Tootip adding control getting unexpected result

1 Answer 37 Views
ToolTip
This is a migrated thread and some comments may be shown as answers.
Richard
Top achievements
Rank 1
Richard asked on 12 Feb 2009, 06:13 PM
Hi,
Thanks for resolving my problem in the past. Here is another one and I spent 3 hours on this & cant figure out. Please help

I am using tooltip as a popup message control. I have two scenarios - one is using tooltip to display text and the other one is using tooltip to display content inside of control(s). In this case, i'll use label as the parameter for popup - see below

  Public Sub ShowPopupMessage(ByVal message As String)  
 
        Dim popupMessage As New Telerik.Web.UI.RadToolTip  
 
        pl.Controls.Add(popupMessage)  
 
        SetPopupControlProperties(popupMessage)  
        popupMessage.Text = message  
 
    End Sub 
 
 
    Public Sub ShowPopupMessage(ByVal lbl As Label)  
 
 
        Dim popupMessage As New Telerik.Web.UI.RadToolTip  
        pl.Controls.Add(popupMessage)  
 
        SetPopupControlProperties(popupMessage)  
 
        popupMessage.Controls.Add(lbl)  
 
    End Sub 

Let say I have two buttons and upon click - it will either call ShowPopupMessage(String) or ShowPopupMessage(Label control).

If I click on ShowPopupMessage(String) and then click on ShowPopupMessage(Label) - the 2nd popup does not show the right content. It is still showing ShowPopupMessage(String) content. Any idea? Thanks!


1 Answer, 1 is accepted

Sort by
0
Richard
Top achievements
Rank 1
answered on 12 Feb 2009, 06:21 PM
Nevermind - I figured out but i dont know the reason behind it though. 

It looks like I can not add two RadToolTips to the same panel. In this case, it's "p1" panel.  When putting 2nd radtooltip in another panel - it is working.

Edit: I defined ID for each radtooltip and still have the same problem.
Tags
ToolTip
Asked by
Richard
Top achievements
Rank 1
Answers by
Richard
Top achievements
Rank 1
Share this question
or