[CLOSED] Not stretch User Control in Tab panel

  1. #1

    [CLOSED] Not stretch User Control in Tab panel

    Hi All,

    We have a requirement to open popup window based on screen resolution. So we are not used to define the height and width in the controls. In a page we are using 4 tabs, 3 tabs controls are stretched properly. The 4th tab we are using user control to list the attachments. In this tab, the control could not stretch for available width and height. Please help us how to stretch the user control in available spaces.
    The following source we have used,
    <ext:TabPanel ID="TabPanel1" runat="server">
                                <Items>
                                    <ext:Panel ID="Tab1" runat="server">
                                        <Content>
                                            <ext:AnchorLayout runat="server">
                                                <Anchors>
                                                    <ext:Anchor>
                                                        <ext:Panel ID="Panel3" AutoScroll="true" runat="server" Height="130px" Layout="AnchorLayout">
                                                            <Items>
                                                                <ext:HtmlEditor ID="HtmlEdr1" runat="server" CtCls="hide-toolbar" ReadOnly="true"
                                                                    AnchorHorizontal="100%" AnchorVertical="100%">
                                                                </ext:HtmlEditor>
                                                            </Items>
                                                        </ext:Panel>
                                                    </ext:Anchor>
                                                    <ext:Anchor>
                                                        <ext:HtmlEditor ID="HtmlEdr2" runat="server" FieldClass="edit-form" AnchorHorizontal="100%"
                                                            AnchorVertical="100%">
                                                            <Listeners>
                                                                <Initialize Handler="Ext.DomHelper.applyStyles(this.getEditorBody(), {'background-position' : 'top right'});" />
                                                            </Listeners>
                                                        </ext:HtmlEditor>
                                                    </ext:Anchor>
                                                </Anchors>
                                            </ext:AnchorLayout>
                                        </Content>
                                    </ext:Panel>
                                    <ext:Panel ID="Tab3" Layout="AnchorLayout" runat="server">
                                        <Items>
                                            <ext:HtmlEditor ID="HtmlEdr3" runat="server" CtCls="hide-toolbar" ReadOnly="true"
                                                AnchorHorizontal="100%" AnchorVertical="100%">
                                            </ext:HtmlEditor>
                                        </Items>
                                    </ext:Panel>
                                    <ext:Panel ID="Tab4" Layout="AnchorLayout" runat="server">
                                        <Items>
                                            <ext:HtmlEditor ID="HtmlEdr4" runat="server" CtCls="hide-toolbar" ReadOnly="true"
                                                AnchorHorizontal="100%" AnchorVertical="100%">
                                            </ext:HtmlEditor>
                                        </Items>
                                    </ext:Panel>
                                    <ext:Panel ID="Tab2" runat="server">
                                        <Content>
                                            <ext:Panel ID="pnlAttach" runat="server">
                                                <Content>
                                                    <UserControlAttachment:Attachment ID="ucAttachments" SetDefaultHeight="240px" runat="server"
                                                        Visible="true" />
                                                </Content>
                                            </ext:Panel>
                                        </Content>
                                    </ext:Panel>
                                </Items>
                                <DirectEvents>
                                    <TabChange OnEvent="TabChange" ShowWarningOnFailure="false" Timeout="120000">
                                    </TabChange>
                                </DirectEvents>
                            </ext:TabPanel>
    Please see the attachment
    Click image for larger version. 

Name:	PopupUserControl.jpg 
Views:	97 
Size:	74.7 KB 
ID:	3263
    Last edited by Daniil; Oct 05, 2011 at 10:50 AM. Reason: [CLOSED]
  2. #2
    Hi,

    Is there just a GridPanel in that user control?

    If so, please wrap that GridPanel in a <ext:FitLayout> control.

Similar Threads

  1. Replies: 2
    Last Post: Feb 06, 2012, 9:06 AM
  2. Can I stretch a TextArea control inside a Panel?
    By paul-2011 in forum 1.x Help
    Replies: 7
    Last Post: Aug 26, 2010, 10:55 PM
  3. Replies: 8
    Last Post: Jun 01, 2010, 3:01 PM
  4. Replies: 0
    Last Post: May 03, 2010, 4:33 AM
  5. Replies: 2
    Last Post: Apr 23, 2009, 5:49 PM

Tags for this Thread

Posting Permissions