[CLOSED] All my Absolute Layouts appears that have the space between the fields changed

  1. #1

    [CLOSED] All my Absolute Layouts appears that have the space between the fields changed

    After upgrade the ext.net to 2.x, my Absolute Layouts have the space between the fields changed...

    1 - It seems that the position in X is greater than in version 1.x (yellow arrow)
    2 - It seems that the position in Y is greater than in version 1.x (red arrow)
    3 - The component fset is bigger .. but I do not know if it has changed the size or padding of fset Panel containing these objects. I've changed the Paggind for BodyPadding...

    Attachment 3757

    I'm set new size and positions screen by screen... I am doing right or should try another approach? At the risk of having to redo this work in the next update?

    Thanks for any help
    Last edited by Daniil; Jan 25, 2012 at 12:36 PM. Reason: [CLOSED]
  2. #2
    Follows the code of one of the windows, if help...

    <ext:Window 
        ID="wndEmpresasSGE" 
        runat="server"
        Icon="UserAdd"
        Title="Cadastro de Empresas"
        Width="700" 
        Height="550" 
        AutoShow="false" 
        Modal="true" 
        Resizable="false"
        PaddingSummary="5px 5px 5px 5px"
        Hidden="true"
        ButtonAlign="Right"
        Layout="FitLayout">
        <Items>
            <ext:Panel ID="Panel1" runat="server" Border="true" BodyPadding="3" Header="false">
                <Items>
                    <ext:FieldSet runat="server" ID="fsInformacoesGerais" Title="Informações Gerais" Layout="AbsoluteLayout" Height="265px" PaddingSummary="5px 5px 5px 5px">
                        <Defaults>
                            <ext:Parameter Name="LabelAlign" Value="Top" Mode="Value" />
                        </Defaults>
                        <Items>
                            <ext:TextField runat="server" ID="txtNome" MaxLength="200" FieldLabel="Nome" X="5" Y="5" Width="310px" />
                            <ext:TextField runat="server" ID="txtNomeFantasia" MaxLength="100" FieldLabel="Nome fantasia" X="325" Y="5" Width="310px" />
                            <ext:TextField runat="server" ID="txtFone" FieldLabel="Telefone" MaxLength="12" X="5" Y="50" Width="205px" EnableKeyEvents="true">
                                <Listeners>
                                    <KeyUp Fn="KeyUpHandler_Fone" />
                                </Listeners>
                            </ext:TextField>
                            <ext:TextField runat="server" ID="txtCelular" FieldLabel="Celular" MaxLength="12" X="220" Y="50" Width="205px" EnableKeyEvents="true">
                                <Listeners>
                                    <KeyUp Fn="KeyUpHandler_Fone" />
                                </Listeners>
                            </ext:TextField>
                            <ext:TextField runat="server" ID="txtFax" FieldLabel="Fax" MaxLength="12" X="435" Y="50" Width="200px" EnableKeyEvents="true">
                                <Listeners>
                                    <KeyUp Fn="KeyUpHandler_Fone" />
                                </Listeners>
                            </ext:TextField>
                            <ext:TextField runat="server" ID="txtEmail" FieldLabel="E-mail" MaxLength="200" X="5" Y="95" Width="205px" />
                            <ext:TextField runat="server" ID="txtEmailCobranca" FieldLabel="E-mail de cobrança" MaxLength="200" X="220" Y="95" Width="205px" />
                            <ext:TextField runat="server" ID="txtEmailExtras" FieldLabel="E-mail extras" X="435" Y="95" Width="200px" />
                            <ext:TextArea runat="server" ID="txtObs" FieldLabel="Observações" MaxLength="250" X="5" Y="140" Width="630" Height="80px" />
                            <ext:DisplayField runat="server" ID="dsMsg" X="5" Y="215" Width="630" StyleSpec="font-size:9px" text="Prezado associado: Os dados encaminhados acima podem interferir no êxito da cobrança dos títulos. Dessa forma, para um melhor resultado, faz-se necessário que estes dados nos levem até o seu inadimplente." />
                        </Items>
                    </ext:FieldSet>
                    <ext:FieldSet runat="server" ID="fsEndereco" Title="Endereço" Layout="AbsoluteLayout" Height="115px" PaddingSummary="5px 5px 5px 5px">
                        <Defaults>
                            <ext:Parameter Name="LabelAlign" Value="Top" Mode="Value" />
                        </Defaults>
                        <Items>
                            <ext:TriggerField runat="server" ID="txtCep" FieldLabel="Cep" MaxLength="10" X="5" Y="5" Width="120px" EnableKeyEvents="true">
                                <Triggers>
                                    <ext:FieldTrigger Icon="Search" Tag="Search" />
                                </Triggers>
                                <Listeners>
                                    <KeyUp Fn="KeyUpHandler_CEP" />
                                </Listeners>
                                <DirectEvents>
                                    <TriggerClick OnEvent="TriggerClick_Cep">
                                        <EventMask ShowMask="true" Target="CustomTarget" CustomTarget="={#{wndEmpresasSGE}.body}" />
                                    </TriggerClick>
                                    <Blur OnEvent="TriggerClick_Cep">
                                        <EventMask ShowMask="true" Target="CustomTarget" CustomTarget="={#{wndEmpresasSGE}.body}" />
                                    </Blur>
                                </DirectEvents>
                            </ext:TriggerField>
                            <ext:TextField runat="server" ID="txtEndereco" FieldLabel="Endereço" MaxLength="100" X="135" Y="5" Width="390px" />
                            <ext:TextField runat="server" ID="txtNumero" FieldLabel="Número" MaxLength="10" X="535" Y="5" Width="100px" />
                            <ext:TextField runat="server" ID="txtBairro" FieldLabel="Bairro" MaxLength="50" X="5" Y="50" Width="180px" />
                            <ext:TextField runat="server" ID="txtComplemento" FieldLabel="Complemento" MaxLength="50" X="195" Y="50" Width="190px" />
                            <ext:TriggerField runat="server" ID="txtCidade" FieldLabel="Cidade" MaxLength="40" X="395" Y="50" Width="190px">
                                <Triggers>
                                    <ext:FieldTrigger Icon="Search" Tag="Search" />
                                </Triggers>
                                <DirectEvents>
                                    <TriggerClick OnEvent="TriggerClick_Cidade"/>
                                </DirectEvents>
                            </ext:TriggerField>
                            <ext:TextField runat="server" ID="txtUF" FieldLabel="UF" X="595" Y="02" Width="40px" />
                        </Items>
                    </ext:FieldSet>
                    <ext:FieldSet runat="server" ID="fsDocumentos" Title="Documentação" Layout="AbsoluteLayout" Height="70px" PaddingSummary="5px 5px 5px 5px">
                        <Defaults>  
                            <ext:Parameter Name="LabelAlign" Value="Top" Mode="Value" />
                        </Defaults>
                        <Items>
                            <ext:TextField runat="server" ID="txtCPF" FieldLabel="CPF" X="5" Y="5" Width="120px" EnableKeyEvents="true" Validator="ValidaCPF_CNPJ" ValidateOnBlur="true">
                                <Listeners>
                                    <KeyUp Fn="KeyUpHandler_CPF" />
                                </Listeners>
                            </ext:TextField>
                            <ext:TextField runat="server" ID="txtIdentidade" FieldLabel="Identidade" MaxLength="25" X="135" Y="5" Width="120px" />
                            <ext:DateField runat="server" ID="dtNascimento" FieldLabel="Data de Nascimento" X="265" Y="5" Width="120px" AltFormats="d/m/Y|j/n/Y|j/n/y|j/m/y|d/n/y|j/m/Y|d/m/Y|d-m-y|d-m-Y|d/m|d-m|dm|dmy|dmY|d|d-m-Y" Format="dd/MM/yyyy"/>
                        </Items>
                    </ext:FieldSet>
                </Items>
            </ext:Panel>
        </Items>
        <Buttons>
            <ext:Button runat="server" id="btnOk" text="Ok" Width="80px" Icon="Tick">
                <DirectEvents>
                    <Click OnEvent="SaveEmpresa" Failure="Ext.MessageBox.alert('Saving failed', 'Error during ajax event');">
                        <EventMask ShowMask="true" Target="CustomTarget" CustomTarget="={#{wndEmpresasSGE}.body}" />
                    </Click>
                </DirectEvents>
            </ext:Button>
            <ext:Button runat="server" id="btnCancel" text="Cancelar" Width="80px" Icon="Cancel">
                <Listeners>
                    <Click Handler="#{wndEmpresasSGE}.hide(null);" />
                </Listeners>
            </ext:Button>
        </Buttons>
        <DirectEvents>
            <Hide OnEvent="OnHide" Failure="Ext.MessageBox.alert('Load failed', 'Error during ajax event!');">
            </Hide>
        </DirectEvents>
    </ext:Window>
  3. #3
    Hi,

    I have run two pages with the window you posted - the first one under Ext.NET v1, another under Ext.NET v2 and compared the results.

    Quote Originally Posted by supera View Post
    1 - It seems that the position in X is greater than in version 1.x (yellow arrow)
    It appears to be the same on my side.

    Quote Originally Posted by supera View Post
    2 - It seems that the position in Y is greater than in version 1.x (red arrow)
    Confirmed. But I was unable to determine the reason. "top" and "left" CSS rules appears to be the same as they are in Ext.NET v1.

    Needs more time to investigate.

    Quote Originally Posted by supera View Post
    3 - The component fset is bigger .. but I do not know if it has changed the size or padding of fset Panel containing these objects. I've changed the Paggind for BodyPadding...
    Not 100% sure that I correctly understand, but you, seems, tells that a space on the right became bigger, isn't that so?

    Well, as far as I can see an entire container became a bit bigger. So, I can't see any way to fix apart from to increase the sizes of the fields.
  4. #4
    Thanks for your attention, Daniil

    All my window, panel, fset, etc. in my test project display any difference in layout...

    There are few pages, I am changing them manually.

    Probably I did something wrong...
    If you have any tips for me to pass, would be very grateful

    For my part, I believe that this case has been closed.

    Thanks!
  5. #5
    If you have any tips for me to pass, would be very grateful
    The main advice is no rush. Carefully looking at CHANGELOG, then on API docs.

    Then, if you don't get a solution, please feel free to ask us. We will do our best to help.

    Quote Originally Posted by supera View Post
    I'm set new size and positions screen by screen... I am doing right or should try another approach?
    Well, I've discovered that FieldLabels are not aligned the same way under v1 and v2. I would look into it at the first of all.

    The following thing:
    <Defaults>
        <ext:Parameter Name="LabelAlign" Value="Top" Mode="Value" />
    </Defaults>
    doesn't affect in v1, it does affect when it is set up for a container.

    But it does affect in v2, LabelAlign property might be set up for a separate field.

    The related CHANGELOG item is #64 one.
    http://examples2.ext.net/#/Getting_S...nts/CHANGELOG/

    Quote Originally Posted by supera View Post
    At the risk of having to redo this work in the next update?
    Hopefully, not, there should not be required a big work with the next releases, but some tune-up might be required.
  6. #6
    Ok...

    thanks for your clarification, Daniil
  7. #7
    Please clarify can we mark the thread as closed?
  8. #8
    Yes, you can mark this thread as closed

    thanks a lot

Similar Threads

  1. Replies: 1
    Last Post: Apr 28, 2011, 1:00 PM
  2. [CLOSED] Problem with Absolute Layout in IE
    By macap in forum 1.x Premium Help
    Replies: 2
    Last Post: Nov 09, 2010, 8:51 AM
  3. [CLOSED] Absolute layout
    By Jean-Pierre Poulin in forum 1.x Premium Help
    Replies: 1
    Last Post: Apr 01, 2010, 5:26 PM
  4. Possible to combine Absolute and Anchor layouts?
    By dbassett74 in forum 1.x Help
    Replies: 5
    Last Post: Aug 25, 2009, 12:16 PM
  5. [CLOSED] Question about layouts
    By jcanton in forum 1.x Premium Help
    Replies: 8
    Last Post: Jul 21, 2009, 11:55 AM

Posting Permissions