user737830
user737830

Reputation: 1

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 along 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.

Upvotes: 0

Views: 162

Answers (3)

supercooldude
supercooldude

Reputation: 195

If you want to decrease the image in the button too, it might be better to use the scaleX property instead of width.

Upvotes: 0

Wim Deblauwe
Wim Deblauwe

Reputation: 26848

Just use the width property ?

Upvotes: 0

JeffryHouser
JeffryHouser

Reputation: 39408

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.

Upvotes: 1

Related Questions