Jul 25, 2011, 2:29 PM
[CLOSED] Layout not applied to panel after dynamic rendering when used with TabStrip
Hi, I'm having trouble dynamically adding new panels for use with tabstripitems. The panels are being created and are being displayed on tab click but the panel isn't using the 'fit' layout specified by its container. I've tried using .ForceLayout on creation and also .DoLayout and .SyncSize after creation but they do not appear to be working. I've also tried forcing layout on clientside tabstripitem click. I've included a sample app below that demonstrates the issue so if someone could help that would be fantastic.
I'm using the latest release and this issue appears at least with Chrome and IE.
Thanks,
Gav
I'm using the latest release and this issue appears at least with Chrome and IE.
Thanks,
Gav
<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="TabContentResizeIssue.aspx.vb"
Inherits="LargeDropdownTest.TabContentResizeIssue" %>
<%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<script runat="server">
Protected Sub AddTab(sender As Object, e As Ext.Net.DirectEventArgs)
Dim ID As String = Guid.NewGuid.ToString
Dim TabStripItem As New Ext.Net.TabStripItem With {.ActionItemID = ID, .Title = ID}
Dim Panel As New Ext.Net.Panel With {.ID = ID}
TabStrip.AddItem(TabStripItem)
Panel.Html = Panel.ID
TabStrip.SetActiveTab(TabStripItem)
Panel.Render(pnlCentre)
End Sub
</script>
<body>
<form id="form1" runat="server">
<ext:ResourceManager ID="rm" runat="server" />
<ext:Viewport ID="vp" runat="server" Layout="border" ForceLayout="true">
<Items>
<ext:Panel ID="pnlCentre" runat="server" Layout="Fit" Region="Center" Title="Center"
Header="false" ForceLayout="true">
<TopBar>
<ext:Toolbar ID="Toolbar" runat="server">
<Items>
<ext:TabStrip ID="TabStrip" runat="server" />
<ext:Button ID="cmdAddPage" runat="server" Icon="PageAdd" Text="Add Page">
<DirectEvents>
<Click OnEvent="AddTab">
</Click>
</DirectEvents>
</ext:Button>
</Items>
</ext:Toolbar>
</TopBar>
<Items>
</Items>
</ext:Panel>
</Items>
</ext:Viewport>
</form>
</body>
</html>
Last edited by Daniil; Jul 26, 2011 at 8:57 AM.
Reason: [CLOSED]