-
18 Jul 2010 6:40 PM #1
[CLOSED]panels disappear when fullscreen:false
[CLOSED]panels disappear when fullscreen:false
Is it a bug or some strange feature which I don't understand that causes panels to disappear when fullscreen is false.
With this code I see a blank page:
With this code I see the text I expect:Code:Ext.setup({ onReady: function() { new Ext.Panel({ id: 'mainscreen', html: 'This is some text in a panel. <br /><small>This is smaller text.</small>', }); } });
});Code:Ext.setup({ onReady: function() { new Ext.Panel({ id: 'mainscreen', html: 'This is some text in a panel. <br /><small>This is smaller text.</small>', fullscreen:true }); }
What up?
Thanks,
Sarah
-
18 Jul 2010 7:03 PM #2
Fullscreen components automatically show themselves, you need to either:
a) explicitly call show
b) render it to an element
If they aren't.Evan Trimboli
Sencha Developer
Twitter - @evantrimboli
Don't be afraid of the source code!
-
18 Jul 2010 7:09 PM #3
on showing panels
on showing panels
1) If hidden is false by default, why must I call show?
2) what does it mean to "render it to an element" ? Can you specify what the code would look like for that?
Thanks for your quick response,
Sarah
-
18 Jul 2010 7:11 PM #4
fullscreen true automatically renders it to the document body. If not, the component isn't rendered until you call either render, or show.
All components have to be rendered somewhere in the DOM, so you can specify a particular element, or you can just call show(), which will render to the document body if you haven't specified anywhere to render it to.Evan Trimboli
Sencha Developer
Twitter - @evantrimboli
Don't be afraid of the source code!
-
18 Jul 2010 7:26 PM #5
Sorry to appear dimwitted, but I'm not getting it. I tried this:
and got this error:Code:Ext.setup({ onReady: function() { var mypanel = new Ext.Panel({ id: 'mainscreen', html: 'This is some text in a panel. <br /><small>This is smaller text.</small>' }); mypanel.render(); } });
TypeError: Result of expression 'el' [null] is not an object.
However, this code worked:
What exactly does render do, when would i use it and how is it used correctly (since the above code is clearly wrong)?Code:Ext.setup({ onReady: function() { var mypanel = new Ext.Panel({ id: 'mainscreen', html: 'This is some text in a panel. <br /><small>This is smaller text.</small>' }); mypanel.show(); } });
Thanks,
Sarah
-
18 Jul 2010 7:38 PM #6
Render expects an element as the first parameter, however it's more common to use:
Code:new Foo({ renderTo: 'el' });Evan Trimboli
Sencha Developer
Twitter - @evantrimboli
Don't be afraid of the source code!
-
18 Jul 2010 8:00 PM #7
-
18 Jul 2010 8:08 PM #8
Either
a) The id of an element
b) A dom element reference
c) An Ext.Element referenceEvan Trimboli
Sencha Developer
Twitter - @evantrimboli
Don't be afraid of the source code!
Thank you for reporting this bug. We will make it our priority to review this report.
Similar Threads
-
[CLOSED] remove(false)/removeAll(false) keep the items visible
By ykoehler in forum Ext 3.x: BugsReplies: 4Last Post: 11 Mar 2011, 8:21 PM -
panel.remove(item,false) => item does not disappear
By maho2nd in forum Ext 3.x: Help & DiscussionReplies: 4Last Post: 14 Jan 2010, 3:54 AM -
[2.2][Closed]TabPanel with deferredRender == false does not render newly added panels
By reycri in forum Ext 2.x: BugsReplies: 4Last Post: 19 Mar 2009, 5:53 PM -
[2.0.2] Panels using region other than center disappear when IE is resized.
By mozenda in forum Ext 2.x: BugsReplies: 7Last Post: 29 Apr 2008, 2:49 PM -
[Solved]tabpanel autodestroy false and readding panels
By cocorossello in forum Ext 2.x: Help & DiscussionReplies: 7Last Post: 24 Jan 2008, 4:55 AM


Reply With Quote
