View Full Version : Unable to set panel size

14 Jul 2011, 9:15 PM
Hi guyz,
i am new to Sencha Touch and having problems in setting size of panel. I am trying to create a custom panel and dont want it to occupy full screen. Below is the code. When i run it nothing shows up on my screen. when i pass "fullscreen:true" it displays but occupy fullscreen and i dont want that

//creating custom panel
//inheriting from panel
sharedApp.ShopProductView = Ext.extend(Ext.Panel, {

id : 'mainPanel',
style: "background: url(./bgImage.gif)",
width: 320,
height: 600,
initComponent: function(){
items : [{
html: 'Welcome to My App!'

// creating application

new Ext.Application({
launch: function(){
sharedApp.panel = new sharedApp.ShopProductView();
this.viewport = sharedApp.panel;

14 Jul 2011, 10:34 PM
Watch the screencasts for Panels and Layouts if you haven't already:


In fact, make sure you go through all the screencasts.

15 Jul 2011, 1:29 AM
Try adding floating: true to your config.

18 Jul 2011, 3:26 AM
Thanx bwg and stoot98. I have already gone through these two tutorials and tried by adding floating:true to config but nothing helped:( any other suggestion?? keep in mind that i am trying to set size of my base panel and setting it as viewport