[CLOSED] [1.0] Initially Hidden fields in CompositeField do not render properly on becoming visible

  1. #1

    [CLOSED] [1.0] Initially Hidden fields in CompositeField do not render properly on becoming visible

    Hi think, this might be a bug with ExtJs itself instead of Ext.Net.

    But here's the code to reproduce it:


        <ext:CompositeField runat="server">
    		<Items>
    			<ext:DateField runat="server" />
    			<ext:Checkbox runat="server" ID="chk" BoxLabel="Checkbox" Hidden="true" />
    		</Items>
        </ext:CompositeField>
        <ext:Button runat="server" Text="Click" OnClientClick="#{chk}.show();" />

    As you can see, the Checkbox overlaps with the Datefield on becoming visible. There was no such issue with MultiFields that have been deprecated now.


    My work-around currently is to specify "margin-left: 120px" for the StyleSpec of the CheckBox.
  2. #2

    RE: [1.0] Initially Hidden fields in CompositeField do not render properly on becoming visible

    Hi,

    Yes, BoxLayout (HBox/VBox) don't like hidden items (composite field uses HBox). I need investigate the code of the HBox class

    I can suggest another workaround
    <ext:CompositeField runat="server" Width="500">
                <Items>
                    <ext:DateField runat="server" />
                    <ext:Checkbox runat="server" ID="chk" BoxLabel="Checkbox" Cls="x-hidden" />
                </Items>
            </ext:CompositeField>
            <ext:Button runat="server" Text="Click" OnClientClick="#{chk}.removeClass('x-hidden');#{chk}.wrap.removeClass('x-hidden');" />
  3. #3

    RE: [1.0] Initially Hidden fields in CompositeField do not render properly on becoming visible

    Hi vlad, what's wrap doing on the CheckBox above? I could not find any Extjs doc about wrap on Checkbox or BoxLayout??
  4. #4

    RE: [1.0] Initially Hidden fields in CompositeField do not render properly on becoming visible

    Hi,

    Well, at this moment I don't think that it is bug because you have to call 'doLayout' after show/hide items

    <ext:CompositeField ID="Field1" runat="server">
                <Items>
                    <ext:DateField runat="server" />
                    <ext:Checkbox runat="server" ID="chk" BoxLabel="Checkbox" Hidden="true" />
                </Items>
            </ext:CompositeField>
            <ext:Button runat="server" Text="Click" OnClientClick="#{chk}.show();#{Field1}.innerCt.doLayout();" />
    what's
    wrap doing on the CheckBox above?

    Many fields (for example, trigger fields) has wrapper element (just div which wraps whole field markup). 'wrap' is referencing
    on that div

Similar Threads

  1. [CLOSED] Flat-Button in CompositeField not displayed properly
    By pschojer in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Sep 29, 2011, 11:47 AM
  2. [CLOSED] CompositeField: Only last item visible
    By pschojer in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Apr 21, 2011, 2:19 PM
  3. Replies: 8
    Last Post: Apr 14, 2011, 4:20 PM
  4. Replies: 5
    Last Post: May 25, 2010, 12:00 PM
  5. Replies: 3
    Last Post: Aug 21, 2009, 2:24 PM

Posting Permissions