PDA

View Full Version : How to put content inside sencha touch panels?



keune
24 Aug 2011, 6:20 AM
I have been using HTML - CSS - JS combination to build web apps for quite some time.
Now i'm trying to get used to sencha, and i find it hard to get my head around the idea of writing all your layout code in js.
For example, i added a toolbar and a button to the right side of it, and i want to add some content to the left. I don't know how to do it. I couldn't quite get the concept of sencha and the app structure.

I'm open to good advices.

BostonMerlin
24 Aug 2011, 7:31 AM
There are many ways of adding content, from lists, fields and data views Depending on the content you want displayed and your familiararity you could start off by placing a panel where you want your content, then use the html: property of that panel to insert anything you like.

Hope that helps
John

Mthor
24 Aug 2011, 3:12 PM
For example, i added a toolbar and a button to the right side of it, and i want to add some content to the left. I don't know how to do it. I couldn't quite get the concept of sencha and the app structure.




var myToolbar = new Ext.Toolbar({
dock : 'top',
title: 'My Toolbar',
items: [
this.leftButton,
{xtype: 'spacer'},
this.rightButton
]
});





if that is in your toolbar then a button would be on the left and the right of the toolbar.

I am not sure if that is all you were looking for, the learning center helps alot and going through the examples and modify them to your own settings helps.