How to decrease the size of a button?
How to decrease the size of a button?
I have a button in which it contains an image.But my problem here is i am unable to decrease the width of the button al开发者_StackOverflowong with image.
How can we decrease the size of that kind of button.
If possible provide me some sample code.
Below is my sample code:
<mx:Button id="line" toggle="true" paddingLeft="1" paddingRight="1" icon="@Embed(source='Images/line.png')" toolTip="Line" useHandCursor="true" buttonMode="true" click="doDrawEnable()" ></mx:Button>
Thanks, Naveen.
Easy way is to Use the width property:
<mx:Button id="line" width="100" />
This code, for example, would force your button to 100 pixels wide.
Just use the width
property ?
If you want to decrease the image in the button too, it might be better to use the scaleX property instead of width.
精彩评论