May 15, 2013, 1:18 PM
[CLOSED] Adding ToolTip to panel in codebehind
I'm trying to conditionally add a tooltip to a panel (inside of a tabPanel) in codebehind. Though I get no errors I don't get the tooltip either. I am also changing the icon of the panel and that part works. The page is fairly complex so only partial code below:
Thanks,
Robb
<ext:FitLayout ID="FitLayout1" runat="server">
<Items>
<ext:Panel ID="MainPanel" runat="server" Border="false" Layout="FitLayout">
<Items>
<ext:TabPanel ID="TabPanel" runat="server" ActiveIndex="0" Header="true" EnableTabScroll="true" Border="false">
<Items>
<ext:Panel ID="DummyPanel" runat="server" Title="" Header="false" Border="false" />
<ext:Panel runat="server" AutoScroll="true" Layout="FitLayout" ID="QuickViewPanel" Title="Quick View" />
<ext:Panel runat="server" AutoScroll="true" Layout="FitLayout" ID="HoldingsPanel" Title="Market Value" />
<ext:Panel runat="server" AutoScroll="true" Layout="FitLayout" ID="PerformancePanel" Title="Performance" />
<ext:Panel runat="server" AutoScroll="true" Layout="FitLayout" ID="QuickReportsPanel" Title="Quick Reports" />
<ext:Panel runat="server" AutoScroll="true" Layout="FitLayout" ID="PerformanceRefreshPanel" Title="Performance Refresh" />
<ext:Panel runat="server" AutoScroll="true" Layout="FitLayout" ID="ReportsPanel" Title="Reporting" />
<ext:Panel runat="server" AutoScroll="true" Layout="FitLayout" ID="TransactionsPanel" Title="Transactions" />
<ext:Panel runat="server" AutoScroll="true" Layout="FitLayout" ID="AccountAdminPanel" Title="Account Admin" />
<ext:Panel runat="server" AutoScroll="true" Layout="FitLayout" ID="ProposalAccountPanel" Title="UMA Admin" />
<ext:Panel runat="server" AutoScroll="true" Layout="FitLayout" ID="HouseholdAdminPanel" Title="Household Admin" />
<ext:Panel runat="server" AutoScroll="true" Layout="FitLayout" ID="PerformanceFiltersPanel" Title="Performance Filters" />
<ext:Panel runat="server" AutoScroll="true" Layout="FitLayout" ID="CustomUrlPanel" Title="Custom URL" />
</Items>
</ext:TabPanel>
</Items>
</ext:Panel>
</Items>
</ext:FitLayout>
Code behind, in the data bind of the page if a condition is met, I call this procedure to change the icon and set the tooltip message Public Sub DirtyTab(panelId As String, Optional ByVal DisableIt As Boolean = False)
For Each p In TabPanel.Items
If p.ID = panelId Then
With CType(p, Ext.Net.Panel)
.Icon = Ext.Net.Icon.Error
.Disabled = DisableIt
.ToolTips.Add(New Ext.Net.ToolTip With {.Html = "This tooltip does not show", .TargetControl = p})
End With
End If
Next
End Sub
I also tried adding a tooltip item in the markup and then refrencing it in code behind to change html and that didn't work either. Hoping I am just missing something simple.Thanks,
Robb
Last edited by Daniil; May 17, 2013 at 1:32 PM.
Reason: [CLOSED]