I am using ST 1.1 and I have to dynamically change button width & height according to device dimensions.
I have made buttons using an image specified in css file
I have not specified size of image in css file.
name : 'cityCashBack',
I have obtained width and height of viewport in cardcontroller.js
Then I have obtained button object using
var viewportwidthcc= Ext.Element.getViewportWidth();
var viewportheightcc= Ext.Element.getViewportHeight();
and then later on did
var btnCityCashback = Ext.getCmp('cityCashBack');
but it is not working and button is displayed in some default size.
var rtn=btnCityCashback.setWidth(some width);