View Full Version : Tab panels not working as expected

30 Mar 2012, 4:14 AM
I"m using 341. I dropped a Tab Panel onto a new project. It automatically created three tabs for me to use.

Why did it create tabs as Ext.Container instead of tab.Panel ?
The containers it created don't act right out of the box, they are partially hidden and don't respond to any height setting so they're just about useless.
I don't see any way to add controls to the panels created for me. I wouldn't think i'd have to drop down into the code to build these tab screens out manually.
I don't know if there are issues with the tab panel in this latest Designer drop or if i'm not using them correctly. If this isn't bug related then I'd say the Designer experience with the tab panel needs usability improvements applied.

Thanks in advance,

30 Mar 2012, 5:20 AM
You could set the Containers to layout: fit so they are as big as possible.
If you really need Panel functionality, right click the Container and transform it to an Ext.Panel. But check the first few lines of text on the Panel docs (http://docs.sencha.com/touch/2-0/#!/api/Ext.Panel) where you'll see that most of the time, you'll be fine by using containers.

To add controls to the Container or Panel, drag them from the toolbox onto the component in the design preview or to the component in the Project Inspector.

30 Mar 2012, 6:57 AM
I think I found the problem. If the Ext.tab.Panel control is docked at the bottom, none of the tab containers show. If you undock it from the bottom, it's shown up top and everything works. Again, this is either a bug or i'm not setting something up correctly.

If anyone can dock a tab panel control to the bottom and have all tabs show property.. all within Designer 2... please let me know.


30 Mar 2012, 7:08 AM
upon further investigation, i'm finding you have to generate the 'Tab Bar Config' from within the config properties pane after dropping the control into your project. You set the dock property of the tab bar config and NOT the dock property of the tab control you dragged into your project. If you do this, things appear to work but is not intuitive at all.

notice the screen shot below. you have to set the dock property on the Tab Bar NOT the MyTabPanel control. The confusing part is that the Tab Bar item doesn't show up until you add it.


30 Mar 2012, 8:04 AM
Open to usability improvement suggestions but all of the above statements/confusion look like there is no bug here.

30 Mar 2012, 11:48 PM