-
23 Jan 2012 12:54 AM #1
Answered: Docking issues with panels
Answered: Docking issues with panels
Hello,
I've made this code, but I can't get the bottom panel to show. I'm working at it now for a few days, but I can't figure it out.
Thank you.Code:Ext.setup({ tabletStartupScreen: 'images/Norma/MI-logo-transparant.png', phoneStartupScreen: 'images/Norma/MI-logo-transparant.png', icon: 'images/Norma/Norma.png', glossOnIcon: false, name: 'normamobile', onReady: function () { var app = this; // construct UI var viewport = Ext.create('Ext.Panel', { fullscreen: true, layout: 'fit', showingPage: false, showingSplash: true }); // the toolbar across the top of the app, containing the buttons var topBar = Ext.create('Ext.TitleBar', { ui: 'dark', height: 92, docked: 'top', title: 'Norma Mobile' }); // creates the top banner with patient info var topbarPanel = Ext.create('Ext.Panel', { height: 92, docked: 'top', items: [topBar] }); var bottomBar = Ext.create('Ext.TitleBar', { ui: 'dark', height: 46, docked: 'bottom', title: 'Bottom Bar' }); var bottomPanel = Ext.create('Ext.Panel', { docked: 'bottom', height: 46, items: [bottomBar] }); // the page that displays each chapter and holds the carousel var page = Ext.create('Ext.Panel', { cls: 'page', ui: 'dark', layout: { type: 'fit' }, items: [topbarPanel, bottomPanel] }); //stitch the UI together and create an entry page viewport.add(page); } });
-
Best Answer Posted by rdougan
It looks like your over nesting may be valid, if this is only the basics of your UI (which I assume it is).
Anyhow, it looks like you are not including a DOCTYPE in your index.html file. Simply add the following code at the top of index.html:
And it'll work.Code:<!doctype html>

-
23 Jan 2012 7:31 AM #2Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,710
- Vote Rating
- 436
- Answers
- 3113
Just looking at your code and it seems you are overnesting and not using layouts on some classes that you should be. You can check the DOM to see if something is rendered but has heigh tof 0px to confirm that you need to use a layout or set a height. height will not always just work.
Mitchell Simoens @SenchaMitch
Sencha Inc, Senior Forum Manager
________________
http://www.JSONPLint.com - Source to lint your JSONP!
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
https://github.com/mitchellsimoens
Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/
Need more help with your app? Hire Sencha Services services@sencha.com
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is almost in print!
When posting code, please use BBCode's CODE tags.
-
23 Jan 2012 9:26 AM #3Sencha - Community Support Team
- Join Date
- Mar 2007
- Location
- Frederick MD, NYC, DC
- Posts
- 16,169
- Vote Rating
- 28
- Answers
- 83
Please look at how types are used in the framework. They will ultimately help you reduce code weight.

Jay Garcia @ModusJesus || Modus Create co-founder
Ext JS in Action author
Sencha Touch in Action author
Get in touch for Ext JS & Sencha Touch Touch Training
We are also working on Video-based Sencha Touch training: Check it out here.
-
23 Jan 2012 10:05 AM #4
It looks like your over nesting may be valid, if this is only the basics of your UI (which I assume it is).
Anyhow, it looks like you are not including a DOCTYPE in your index.html file. Simply add the following code at the top of index.html:
And it'll work.Code:<!doctype html>
Sencha Inc.
Robert Dougan - @rdougan
Sencha Touch 2 and Ext JS 4 Core Team Member, SASS/Theming Wizard.
-
23 Jan 2012 11:24 PM #5
@ rdougan, indeed I misted the 'html' part
sorry for bothering you guys.
Thank you for all the help.


Reply With Quote