[SOLVED] [1.0] Form with columns, anchor horizontal
New Community Forums available at http://forums.ext.net
 

Coolite Forums

Welcome Guest ( Login | Register )
 
[SOLVED] [1.0] Form with columns, anchor...
Subscribe
Last Login: 7/5/2010 8:08:31 AM
Posts: 45,
Posted 3/4/2010 3:25:38 AM

Group: Coolite Premium Member & Early Adopter
Hi.

I want to create a two-column layout with form fields in rows. The thing is I want the textfields to stretch horizontally when the browser is resized horizontally. Can't get it to work. Could anyone offer some advice?

<ext:TabPanel runat="server">
    <Items>
        <ext:Panel Title="General" AutoWidth="true" Layout="Fit" runat="server" AutoHeight="true" PaddingSummary="10px 4px 10px 4px">
            <Content>
                <ext:Container runat="server" Layout="Column" AutoHeight="true" AnchorHorizontal="100">
                    <Items>
                        <ext:Container runat="server" Layout="Form" ColumnWidth=".5" Height="200" >
                            <Items>
                                <ext:TextField FieldLabel="Name" runat="server" AnchorHorizontal="95%"/>
                            </Items>
                        </ext:Container>
                        <ext:Container runat="server" Layout="Form" ColumnWidth=".5">
                            <Items>
                                <ext:TextField FieldLabel="Street" runat="server" AnchorHorizontal="95%"/>
                            </Items>
                        </ext:Container>
                    </Items>
                </ext:Container>
            </Content>
        </ext:Panel>
    </Items>
</ext:TabPanel>

...
Last Login: 7/5/2010 10:10:13 AM
Posts: 7,853,
Posted 3/4/2010 9:53:01 AM

Group: Core Development Team
Hi,

Please see the following sample

<%@ Page Language="C#" %>

<%@ 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 id="Head1" runat="server">
</head>
<body style="padding: 20px;">
    <form id="Form1" runat="server">
    <ext:ResourceManager ID="ResourceManager1" runat="server" />
    <ext:Panel Title="General" Layout="Column" runat="server" PaddingSummary="10 0 0 10"  Height="140" MonitorResize="true">
        <Items>
            <ext:Container runat="server" LabelAlign="Top" Layout="Form" ColumnWidth=".5">
                <Items>
                    <ext:TextField runat="server" FieldLabel="First Name" AnchorHorizontal="99%" />
                    <ext:TextField runat="server" FieldLabel="Company" AnchorHorizontal="99%" />
                </Items>
            </ext:Container>
            <ext:Container runat="server" LabelAlign="Top" Layout="Form" ColumnWidth=".5">
                <Items>
                    <ext:TextField runat="server" FieldLabel="Last Name" AnchorHorizontal="99%" />
                    <ext:TextField runat="server" FieldLabel="Email" AnchorHorizontal="99%" />
                </Items>
            </ext:Container>
        </Items>
    </ext:Panel>
    </form>
</body>
</html>



--
Vladimir Shcheglov
Coolite Inc.
Development Team
Forum Guidelines | Coolite Examples | Coolite API Docs | ExtJS API Docs | Twitter
Last Login: 7/5/2010 8:08:31 AM
Posts: 45,
Posted 3/9/2010 1:10:42 AM

Group: Coolite Premium Member & Early Adopter
 Works. Thanks   ...
« Prev Topic | Next Topic »
Reading This Topic
Active Users: 0 ( 0 guests, 0 members, 0 anonymous members )
No members currently viewing this topic.
All times are GMT -5:00, Time now is 8:44pm