[CLOSED] CardLayout Active Index Layout Prob

Page 1 of 2 12 LastLast
  1. #1

    [CLOSED] CardLayout Active Index Layout Prob

    Hey,
    Please test the following example (I tried in FF and Chrome). In firebug type cardPanel.getLayout.setActiveItem(1)

    There are 3 fields in Multifield of panel2. They are not rendered properly. Tried doLayout on panel2 and cardPanel. But does'nt work. If you set panel2 as activeindex, it renders perfectly.

    <ext:Panel runat="server" ActiveIndex="0" ID="cardPanel" Layout="card" Border="false">
        <Items>
            <ext:panel runat="server" ID="panel1" Html="<h1>DummyPanel</h1>"></ext:panel>
            <ext:panel runat="server" ID="panel2" Layout="fit" Padding="10" Height="100">
                <Items>
                    <ext:FormLayout ID="FormLayout1" runat="server" LabelAlign="Top">
                        <Anchors>
                            <ext:Anchor Horizontal="100%" >
                                <ext:MultiField ID="MultiField1" runat="server" FieldLabel="Select Date and Time">
                                    <Fields>
                                        <ext:DateField runat="server" ID="dtDate" FieldLabel="Start Date" ></ext:DateField>
                                        <ext:Timefield runat="server" ID="dtTime" FieldLabel="Start Time" Width="90"></ext:TimeField>
                                        <ext:ComboBox runat="server" Width="200"></ext:ComboBox>
                                    </Fields>
                                </ext:MultiField>
                            </ext:Anchor>
                        </Anchors>
                    </ext:FormLayout>
                </Items>
            </ext:panel>
        </Items>
    </ext:Panel>
    Thanks,

  2. #2

    RE: [CLOSED] CardLayout Active Index Layout Prob

    Hi,

    Possible solutions


    1. Add for panel2 HideMode="Offsets"


    or


    2. Add LayoutConfig for cardPanel


    <LayoutConfig><ext:CardLayoutConfig DeferredRender="true" /></LayoutConfig>
  3. #3

    RE: [CLOSED] CardLayout Active Index Layout Prob

    What does HideMode="Offsets" mean?
  4. #4

    RE: [CLOSED] CardLayout Active Index Layout Prob

    perfect works!



  5. #5

    RE: [CLOSED] CardLayout Active Index Layout Prob

    Hi,

    HideMode can accepts the following values:
    Display (default)
    Offsets
    Visiblity


    Display - uses display:none to hide element (hidden element doesn't occupie place)
    Visibility - use css visibility (hidden element is not visible but still occupies place)
    Offsets - negative offset position


    Dislpay mode has one feature: control with display:none has no size (size always 0)
    Therefore controls are placed inside hidden (with Display mode) container cannot determine own size correctly


    P.S. We made some changes which allow to avoid that issue. Please update from SVN and your original example whould works correctly
  6. #6

    RE: [CLOSED] CardLayout Active Index Layout Prob

    Cool... Thanks...
  7. #7

    RE: [CLOSED] CardLayout Active Index Layout Prob

    Just out of interest sake, the markup for your original sample could be tightened up as follows.

    Example

    <ext:Panel runat="server" ActiveIndex="0" Layout="card" Border="false">
        <Items>
            <ext:Panel runat="server" Html="<h1>DummyPanel</h1>" />
            <ext:FormPanel runat="server" Layout="fit" Padding="10" Height="100" LabelAlign="Top">
                <Items>
                    <ext:MultiField runat="server" FieldLabel="Select Date and Time" AnchorHorizontal="100%">
                        <Fields>
                            <ext:DateField runat="server" FieldLabel="Start Date" />
                            <ext:Timefield runat="server" FieldLabel="Start Time" Width="90" />
                            <ext:ComboBox runat="server" Width="200" />
                        </Fields>
                    </ext:MultiField>
                </Items>
            </ext:Panel>
        </Items>
    </ext:Panel>
    Geoffrey McGill
    Founder
  8. #8

    RE: [CLOSED] CardLayout Active Index Layout Prob

    Thanks Geoff,

    I may sound silly, but why would sum1 use a form layout then? Formpanel does the same job..


  9. #9

    RE: [CLOSED] CardLayout Active Index Layout Prob

    sum1?

    The default layout of a FormPanel is a FormLayout, so an <ext:Panel> with a FormLayout will give the same results. Using a FormLayout just simplifies the markup.

    Geoffrey McGill
    Founder
  10. #10

    RE: [CLOSED] CardLayout Active Index Layout Prob

    sum1=someone - if u were asking wat does it mean...

    and sum1 in this context is for me :)

    So basially if we want to use form layout at all, we can instead use formpanel. There is actually never a need for form layout... hardly any...

Page 1 of 2 12 LastLast

Similar Threads

  1. [CLOSED] Set active tab tabpanel
    By Pablo_Azevedo in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: Jun 22, 2011, 8:03 AM
  2. Replies: 3
    Last Post: Oct 17, 2010, 1:22 PM
  3. Replies: 2
    Last Post: Apr 25, 2010, 2:15 AM
  4. Replies: 0
    Last Post: May 22, 2009, 7:59 AM
  5. [CLOSED] CardLayout rendering ALL panel contents at once AND OUTSIDE the CardLayout?
    By juanpablo.belli@huddle.com.ar in forum 1.x Legacy Premium Help
    Replies: 4
    Last Post: Feb 26, 2009, 3:08 PM

Posting Permissions