PDA

View Full Version : [1.0] Panel autoheight



SouthDeveloper
Feb 12, 2010, 4:50 PM
Hello,

This code used to work at 0.8.2. Now, the panel inside the layoutcolumn isn't showing anymore. The only way i can get to show it, is by setting the panel height, i think autoheight isnt working here.



<ext:Panel Title="Informações do Pedido" Frame="true" Cls="window-padding" AutoWidth="true"
Height="166" AutoScroll="true" runat="server">
<Content>
<ext:FormLayout LabelWidth="140" runat="server">
<Anchors>
<ext:Anchor>
<ext:Panel runat="server">
<Content>
<ext:ColumnLayout runat="server">
<Columns>
<ext:LayoutColumn ColumnWidth=".4">
<ext:Panel runat="server">
<Content>
<ext:FormLayout ItemCls="window-label" LabelWidth="140" runat="server">
<Anchors>
<ext:Anchor>
<ext:Label ID="rpe_cod_pedido_acordo" FieldLabel="Protocolo Pedido" runat="server" />
</ext:Anchor>
<ext:Anchor>
<ext:Label ID="dat_pedido_acordo" FieldLabel="Data/Hora do Pedido" runat="server" />
</ext:Anchor>
<ext:Anchor>
<ext:Label ID="TipoPedido" FieldLabel="Tipo de Pedido" runat="server" />
</ext:Anchor>
<ext:Anchor>
<ext:Label ID="Beneficiario" FieldLabel="Requerente é Beneficiário" runat="server" />
</ext:Anchor>
<ext:Anchor>
<ext:Label ID="qtdBeneficiarios" FieldLabel="Quantidade Beneficiários" runat="server" />
</ext:Anchor>
</Anchors>
</ext:FormLayout>
</Content>
</ext:Panel>
</ext:LayoutColumn>
<ext:LayoutColumn ColumnWidth=".6">
<ext:Panel runat="server">
<Content>
<ext:FormLayout LabelWidth="140" ItemCls="window-label" runat="server">
<Anchors>
<ext:Anchor>
<ext:Label ID="identificao" FieldLabel="Identificação Requerente" runat="server" />
</ext:Anchor>
<ext:Anchor>
<ext:Label ID="nome" FieldLabel="Nome Requerente" runat="server" />
</ext:Anchor>
<ext:Anchor>
<ext:Label ID="rpe_str_email_solicitante" FieldLabel="E-mail do Requerente" runat="server" />
</ext:Anchor>
<ext:Anchor>
<ext:Label ID="telefone" FieldLabel="Telefone do Requerente" runat="server" />
</ext:Anchor>
</Anchors>
</ext:FormLayout>
</Content>
</ext:Panel>
</ext:LayoutColumn>
</Columns>
</ext:ColumnLayout>
</Content>
</ext:Panel>
</ext:Anchor>
<ext:Anchor>
<ext:Label ID="rpe_des_inf_complementar" ItemCls="window-label-observacao" FieldLabel="Obs./Considerações"
runat="server" />
</ext:Anchor>
</Anchors>
</ext:FormLayout>
</Content>
</ext:Panel>

Vladimir
Feb 12, 2010, 5:25 PM
Hi,

Please set FitHeight="false" for ColumnLayout

geoffrey.mcgill
Feb 12, 2010, 6:30 PM
Hi Bruno,

Here's a sample which basically reproduces your original example, although optimizes using much of the new syntax features in v1.0.

Example


<ext:Panel
runat="server"
Title="Example"
Padding="5"
AutoDoLayout="true">
<Items>
<ext:Container runat="server" Layout="hbox">
<Defaults>
<ext:Parameter Name="autoHeight" Value="true" Mode="Raw" />
</Defaults>
<Items>
<ext:Container runat="server" Flex="4">
<Items>
<ext:Label runat="server" FieldLabel="Protocolo Pedido" />
<ext:Label runat="server" FieldLabel="Data/Hora do Pedido" />
<ext:Label runat="server" FieldLabel="Tipo de Pedido" />
<ext:Label runat="server" FieldLabel="Requerente é Beneficiário" />
<ext:Label runat="server" FieldLabel="Quantidade Beneficiários" />
</Items>
</ext:Container>
<ext:Container runat="server" Flex="6">
<Items>
<ext:Label runat="server" FieldLabel="Identificação Requerente" />
<ext:Label runat="server" FieldLabel="Nome Requerente" />
<ext:Label runat="server" FieldLabel="E-mail do Requerente" />
<ext:Label runat="server" FieldLabel="Telefone do Requerente" />
</Items>
</ext:Container>
</Items>
</ext:Container>
<ext:Label runat="server" FieldLabel="Obs./Considerações" />
</Items>
</ext:Panel>

The new .AutoDoLayout was added today. If you can't svn update, you'll have to manually call .DoLayout from code-behind.

Hope this helps.