flashbuttonactionscriptflex-spark

remove extra space in spark button


How is it possible to remove extra space in spark button?

a busy cat
(source: turboimagehost.com)

So i need the image or text starts exactly with left border of the button


Solution

  • You will need to define a new skin for your Button. CSS:

    s|Button {
       skinClass:ClassReference("skins.MySkin");
    }
    

    MySkin.mxml will be a copy of Flex\frameworks\projects\spark\src\spark\skins\spark\ButtonSkin.mxml

    Then you can change the value left="10" for labelDisplay or add a BitmapImage called iconDisplay and set its left value.