Results 1 to 2 of 2

Thread: panel show and hide

  1. #1
    Sencha User omari_yousef's Avatar
    Join Date
    Jul 2010
    Posts
    105
    Vote Rating
    0
      0  

    Default panel show and hide

    i hide and show panel by this way

    Code:
            LoginPanel = Ext.create('Seal.view.Login');
            MainPanel = Ext.create('Seal.view.MainPanel');
            MainPanel.hide();
           Ext.Viewport.add(LoginPanel);
            Ext.Viewport.add(MainPanel);


    but it seem wrong >>>
    because when i try to build production the panel don't show or hide
    is there any other way to show and hide the panels ??

  2. #2
    Sencha - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    39,553
    Answers
    3931
    Vote Rating
    1272
      0  

    Default

    Ext.Viewport by default uses card layout. If you add two items to Ext.Viewport, the current active index will be visible. So if you add two items, the first will be the visible one.
    Mitchell Simoens @LikelyMitch
    Sencha Inc, Senior Software Engineer
    ________________
    Learn BBCode and use it! Checkout the CODE tag!

    Check out my GitHub, lots of nice things for Ext JS and Sencha Touch
    https://github.com/mitchellsimoens

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •