PDA

View Full Version : Sencha 101: showing a panel



DaveC426913
26 Nov 2010, 9:22 AM
In an attempt to eliminate every possible unknown in my floating problem (http://www.sencha.com/forum/showthread.php?117003-Again-what-is-wrong-with-floating), I'm tearing out anything that could possibly interfere. The only other thing in here is fullscreen.

But if I remove it, I get nothing at all.

So, I'm back to the very first pixel of Square One. Show a single panel onscreen.

This does not work:



Ext.setup({
onReady: function() {
var foo = new Ext.Panel({
//fullscreen: true,
width:800,
height:600,
style: 'border:1px solid red;',
html:'outer'
});
foo.show();
},
});

Bucs
26 Nov 2010, 2:04 PM
Not sure why you are setting height/width beyond what the phones can display. Have you tried using a layout like so?:



Ext.setup({
onReady: function() {
var foo = new Ext.Panel({
//fullscreen: true,
style: 'border:1px solid red;',
html:'outer',
layout: {
type: 'vbox',
align: 'stretch'
}
});
foo.show();
}
});

DaveC426913
26 Nov 2010, 2:13 PM
Not sure why you are setting height/width beyond what the phones can display.
"Phones"? What phones? :P


Have you tried using a layout like so?:
Same. Unless fullscreen is true, screen is blank.

Have you tried it yourself and it works?

Bucs
27 Nov 2010, 4:58 AM
No, the code as shown does not render. However, the question is "what exactly is the issue?" Use the Fullscreen property on whatever your app container is going to be, like a viewport.js file or whatever that will be your main container. Then, as you use UI elements to implement your functionality, you will most likely be adding components "into" the main container, and those components will not use fullscreen. Using fullscreen on the outer container causes the container to monitor phone orientation as well, so not sure why you would ever want to NOT use fullscreen on your app's container.

DaveC426913
29 Nov 2010, 6:57 AM
Using fullscreen on the outer container causes the container to monitor phone orientation as well, so not sure why you would ever want to NOT use fullscreen on your app's container.
I was checking to see if it was interfering with the floating, which I still don't have working.

I was unaware that fullscreen was a mandatory config property. Docs are a little sparse on that.