-
27 Sep 2010 11:39 PM #1
Dynamically adding items to Panel
Dynamically adding items to Panel
Hi all,
I just wanted to know, how can I add items dynamically (using code) in a panel. My panel is already created and has a toolbar in it. Once I click on a button inside toolbar, I want to add map inside the panel.
Thanks.Windows Mobile, Windows Phone Specialist | Beginner Android, iPhone Developer
http://www.mayurtendulkar.com
-
27 Sep 2010 11:49 PM #2
Code:var map = new Ext.Map(); panel.add(map); panel.doLayout();
Evan Trimboli
Sencha Developer
Twitter - @evantrimboli
Don't be afraid of the source code!
-
28 Sep 2010 3:59 AM #3
-
28 Sep 2010 4:06 AM #4
It does work, however you haven't provided any context at all so I can't say.
Code:Ext.setup({ tabletStartupScreen: 'tablet_startup.png', phoneStartupScreen: 'phone_startup.png', icon: 'icon.png', glossOnIcon: false, onReady : function() { var p = new Ext.Panel({ fullscreen: true, layout: 'fit' }); setTimeout(function(){ p.add(new Ext.Panel({ html: 'Foo' })); p.doLayout(); }, 2000); } });Evan Trimboli
Sencha Developer
Twitter - @evantrimboli
Don't be afraid of the source code!
Similar Threads
-
Auto adjust panel height after dynamically adding items
By markalroberts in forum Ext 3.x: Help & DiscussionReplies: 8Last Post: 30 Aug 2012, 5:12 AM -
Dynamically adding new items to Carousel
By kostik83 in forum Sencha Touch 1.x: DiscussionReplies: 0Last Post: 9 Jul 2010, 6:54 AM -
dynamically adding panel items
By sk205 in forum Ext 2.x: Help & DiscussionReplies: 1Last Post: 21 May 2008, 11:20 AM -
Adding dynamically items within menu
By Freud in forum Ext 2.x: Help & DiscussionReplies: 1Last Post: 18 Apr 2008, 2:24 AM


Reply With Quote
