Today, we are going to see how to design a more complex layout using hbox, vbox layouts in Sencha Touch 2. Here is the snapshot of the layout design
Here is the sencha source code for the above layout design.
Important Note: Each itemId configuration value denotes the corresponding display position with color for the above layout snapshot.
Hope, you enjoyed this Post.
Here is the sencha source code for the above layout design.
Ext.define('MyApp.view.LayoutContainer', { extend: 'Ext.Container', alias: 'widget.layoutcontainer', config: { itemId: 'layoutcontainer', layout: { type: 'hbox' }, items: [{ xtype: 'container', flex: 1, itemId: 'leftcontainer', layout: { type: 'fit' }, items: [{ xtype: 'container', height: '100%', itemId: 'top-left-red', style: 'background-color:red', width: '100%', layout: { type: 'fit' } }, { xtype: 'panel', docked: 'bottom', height: '60%', itemId: 'bottom-left-green', style: 'background-color:green', width: '100%', layout: { type: 'fit' } }] }, { xtype: 'container', flex: 1, itemId: 'righttcontainer', layout: { type: 'vbox' }, items: [{ xtype: 'panel', flex: 1, height: '50%', itemId: 'top-right-blue', style: 'border-bottom:1px solid;border-left:1px solid;background-color:blue;', width: '100%', layout: { type: 'fit' } }, { xtype: 'panel', flex: 1, height: '50%', itemId: 'bottom-right-yellow', style: 'border-left:1px solid;background-color:yellow;', width: '100%', layout: { type: 'fit' } }] }] } });
Important Note: Each itemId configuration value denotes the corresponding display position with color for the above layout snapshot.
Hope, you enjoyed this Post.
When I try to upgrade my gmap version from v2 to v3 I got the like TypeError: this.getMap(...) is undefined
ReplyDeletethis.getMap().setCenter(point, this.zoomLevel).I am in bit troble. could you please help me to resolve this isssue. I know this is not related to sencha touch. But I think you can help me to resolve this issue. Expect your help at the earliest.
Thanks,
Anu
Hi Anu,
DeleteThis url explains the necessary steps that you need to follow while upgrading from gmap v2 to v3.
https://developers.google.com/maps/documentation/javascript/v2/v2tov3
Hope, this helps!.
Thanks and Regards,
Suresh Ariya
thanks!!
ReplyDeleteLoad more message is showing even if no records to be laoded. How can we turn off 'Load More' message from sencha touch 2.3 paging plugin.
ReplyDeleteThis URL has information regarding how you can hide Load More Message on store.load() callback. Hope, this helps
Deletehttp://www.enovision.net/listpaging-plugin-sencha-touch/
Thanks
Suresh Ariya
Load more issue is again happening when a huge record is loading from the server and when we click on the Load More button the unexpected records listing..how to prevent this issue..
ReplyDeleteAnu,
DeleteI can't able to understand your issue. you mean to say, when i click 'Load More' more records are getting displayed instead of fixed records?
Yes..
DeleteHere is my suggestion:
DeleteTry to pass total records to display from Store using 'extraParams' parameter. Then using the extraParams value in the Server side (PHP, Java) to return the exact records as JSON response.
nice suggestion..thank you so much
Deletehi..I have one doubt in my extjs tree grid.. I have created a tree grid with some columns.. with some context menu..but issue is whenever I tried to add a child under the root node new child is added in the first row.. hw it will add at the end of each record? pls help
ReplyDeleteAnu,
Deleteplease try beforeAdd() event method, http://docs.sencha.com/extjs/4.2.2/#!/api/Ext.container.AbstractContainer-event-beforeadd
Thanks and Regards,
Suresh Ariya