how to dynamically change button size
Hi,
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
Code:
xtype: 'button',
cls:'btnCityCashback',
name : 'cityCashBack',
id:'cityCashBack',
I have not specified size of image in css file.
I have obtained width and height of viewport in cardcontroller.js
Code:
var viewportwidthcc= Ext.Element.getViewportWidth();
var viewportheightcc= Ext.Element.getViewportHeight();
Then I have obtained button object using
Code:
var btnCityCashback = Ext.getCmp('cityCashBack');
and then later on did
Code:
var rtn=btnCityCashback.setWidth(some width);
but it is not working and button is displayed in some default size.
Please help