• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
Locked
0

Flex 4 a major step back when it comes to styling components

New Here ,
May 11, 2010 May 11, 2010

Copy link to clipboard

Copied

Maybe its just me, but I have been a flex designer/developer for over 3 years. I always found the CSS way of styling components to be very straightforward and easy to use. FLex 4 is such a step back I wish adobe would rethink this whole thing. I have spent an enormous amount of time trying to get somewhere with our large enterprise app and it is so much more work to style.  As an example buttons. Do we really need a different skin for every single button we want to add an icon too? According to any examples I have seen this is the case. Why? That makes no sense whatsoever. I probably have 70-80 buttons with different icons so I need to create 70-80 different skins? The old way setting image=source as a property made MUCH more sense. Buttons can no longer have a two tone gradient? Not unless you create skins. This is just one example. I am just finding it VERY frustrating to get the look and feel i want.

Views

298

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 11, 2010 May 11, 2010

Copy link to clipboard

Copied

LATEST

You can accomplish this with a single skin. I did some google searches and found a few ways to do it. Here's one approach:

1) Subclass button and add an icon property to it:

2) In your skin add the following to reference the icon property:

<!-- layer 2: icon -->

<s:Graphic id="icon"

     <s:BitmapImage source="{hostComponent.data.icon}"/>

</s:Graphic>

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines