Hello, i am noticing that my form fields are a little too large for tablet views and i would like to be able to set it based on which device i am using. Currently in my View, i have a width set in the config, but this applies to both profiles and that is not what i want. i am sharing this single view between the phone and tablet and instantiating this view within the controller. i thought setting the width in the controller like this would work
When i do this, it doesn't work and is not applied to that specific profile. Can someone tell me whats the best way to set values, colors etc based on profiles which a view is being shared. Would setting it in the init or launch be better? What about declaring a variable before your class definition(at the top) and setting the width there. I have done this in the past, but i am beginning to think they stored in the global namespace. Please advice, thanks
K
Code:
var registerUserView = Ext.create('MyAPP.view.UserRegister');
registerUserView.width = 200;When i do this, it doesn't work and is not applied to that specific profile. Can someone tell me whats the best way to set values, colors etc based on profiles which a view is being shared. Would setting it in the init or launch be better? What about declaring a variable before your class definition(at the top) and setting the width there. I have done this in the past, but i am beginning to think they stored in the global namespace. Please advice, thanks
K
Aucun commentaire:
Enregistrer un commentaire