[CLOSED] CycleButton to switch Panel in ViewPort East

  1. #1

    [CLOSED] CycleButton to switch Panel in ViewPort East

    Hi all

    I need to show two Panels in a ViewPorts East region. The visability of the two panels should be switched with a CycleButton.
    The CycleButton should be placed on the top of the East Region (normal button height ~25px) and the Panel below should fill the rest of the region...

    I can do what I want - I can't get it :-(

      <ext:Viewport ID="Viewport1" runat="server" Layout="BorderLayout">
          <Items>
            <ext:Panel ID="panGrid" runat="server" Region="Center">
              <Items>
              </Items>
            </ext:Panel>
            <ext:Container ID="cntDetail" runat="server" Title="East" Region="East" Width="225" Layout="FormLayout">
              <Items>
                <ext:Panel ID="panSelector" Border="true" Height="25" Layout="BorderLayout">
                  <Items>
                    <ext:CycleButton ID="cmdMode" runat="server" ShowText="true" PrependText="Mode :  ">
                      <Menu>
                        <ext:Menu ID="Menu1" runat="server">
                          <Items>
                            <ext:CheckMenuItem ID="mnuIndividual" runat="server" Text="Individual" Icon="User">
                              <Listeners>
                                <Click Handler="changeMode(item, e);"></Click>
                              </Listeners>
                            </ext:CheckMenuItem>
                            <ext:CheckMenuItem ID="mnuCompany" runat="server" Text="Company" Icon="House" Checked="true">
                              <Listeners>
                                <Click Handler="changeMode(item, e);"></Click>
                              </Listeners>
                            </ext:CheckMenuItem>
                          </Items>
                        </ext:Menu>
                      </Menu>
                    </ext:CycleButton>
                  </Items>
                </ext:Panel>
                <ext:Container runat="server" Layout="Fitlayout">
                  <Items>
                    <ext:FormPanel runat="server" ID="pnlIndividual" Layout="Fit" Hidden="true">
                      <Items>
                        <ext:Label runat="server" Text="Individual" />
                      </Items>
                    </ext:FormPanel>
                    <ext:FormPanel runat="server" ID="pnlCompany" Layout="Fit">
                      <Items>
                        <ext:Label ID="Label1" runat="server" Text="Company" />
                      </Items>
                    </ext:FormPanel>
                  </Items>
                </ext:Container>
    
              </Items>
            </ext:Container>
    
          </Items>
        </ext:Viewport>
    Any help is welcome !

    Peter
    Last edited by geoffrey.mcgill; Apr 25, 2014 at 2:46 PM. Reason: [CLOSED]
  2. #2
    Hi Peter,

    I think you should use CardLayout instead of Fitlayout. The FitLayout only allows for one Container inside the Parent, but the CardLayout allows for many. The CardLayout is used by the TabPanel Component.

    <ext:Container runat="server" Layout="CardLayout">
    Hope this helps.
    Geoffrey McGill
    Founder
  3. #3
    Quote Originally Posted by geoffrey.mcgill View Post
    Hi Peter,

    I think you should use CardLayout instead of Fitlayout. The FitLayout only allows for one Container inside the Parent, but the CardLayout allows for many. The CardLayout is used by the TabPanel Component.

    <ext:Container runat="server" Layout="CardLayout">
    Hope this helps.
    That was the Solution !
    Thank you...

    Peter

Similar Threads

  1. [CLOSED] Close East Panel by Server side code
    By kevinhwang in forum 2.x Legacy Premium Help
    Replies: 1
    Last Post: Jul 11, 2013, 11:37 PM
  2. Replies: 16
    Last Post: Feb 23, 2011, 10:03 AM
  3. Replies: 1
    Last Post: May 28, 2010, 6:52 AM
  4. Auto Resize Panel in ViewPort on client-side Panel.AutoLoad
    By randy85253 in forum 1.x Legacy Premium Help
    Replies: 13
    Last Post: Dec 03, 2008, 3:27 PM
  5. [CLOSED] Auto Resize of North Panel in ViewPort on Panel.AutoLoad
    By randy85253 in forum 1.x Legacy Premium Help
    Replies: 4
    Last Post: Nov 19, 2008, 12:13 AM

Posting Permissions