-
5 Dec 2011 1:47 PM #1
Answered: How to set tabbar not visible
Answered: How to set tabbar not visible
Hi,
I have a main Tabpanel with one homescreen (login screen).
If an user is not logined I want to hide the tabbar. Problem is, if I set the taber visible with my login action the application will not re-render automaticlly. After a resize of the browser I can see the tabbar.Code:Mobile.views.Viewport = Ext.extend(Ext.TabPanel, { fullscreen: true, initComponent: function() { window.localStorage.clear(), Ext.apply(this, { tabBar: { id: 'viewport_tabbar', dock: 'bottom', layout: { pack: 'center' } }, items: [ { xtype: 'component_homecard', id: 'viewport_component_home'}, { xtype: 'component_searchcardcontrolle', id: 'viewport_component_searchcardmain' }, { xtype: 'component_morecard' , id: 'viewport_component_morecard' } ] }); Mobile.views.Viewport.superclass.initComponent.apply(this, arguments); } });
Can some one support me ? Or show me the best way to do this ?
Regards
-
Best Answer Posted by freightgate
Ok I solved it.
this is my solution. Not nice but it is working
var windowsize = Mobile.views.viewport.getSize();
Mobile.views.viewport.setSize(windowsize.width-1,windowsize.height-1);
Mobile.views.viewport.setSize(windowsize.width,windowsize.height);
-
5 Dec 2011 2:07 PM #2Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,582
- Vote Rating
- 433
- Answers
- 3102
In your tabBar config Object, have you tried setting hidden : true?
Mitchell Simoens @SenchaMitch
Sencha Inc, Senior Forum Manager
________________
http://www.JSONPLint.com - Source to lint your JSONP!
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
https://github.com/mitchellsimoens
Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/
Need more help with your app? Hire Sencha Services services@sencha.com
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is almost in print!
When posting code, please use BBCode's CODE tags.
-
5 Dec 2011 2:20 PM #3
Hi,
yes in my tabbar config I have set
hidden: true
(sorry not in my post above)
and in the controller I do this
If I resize the browser I can see the toolbar, but not directly after the klick.Code:var bottombar = Mobile.views.viewport.getComponent('viewport_tabbar'); bottombar.setVisible(true);
I tried something like
listener:afterrendered
setVisible(false)
without the hidden propertie
but I had no success
-
6 Dec 2011 8:51 AM #4
Can I simulate the resize of the browser ? Maybe this is a work around ?
-
6 Dec 2011 8:59 AM #5
Ok I solved it.
this is my solution. Not nice but it is working
var windowsize = Mobile.views.viewport.getSize();
Mobile.views.viewport.setSize(windowsize.width-1,windowsize.height-1);
Mobile.views.viewport.setSize(windowsize.width,windowsize.height);


Reply With Quote