开发者

Handling multiple UIComponent with Single Skin Class

开发者 https://www.devze.com 2023-03-26 11:19 出处:网络
I have created a simple mxml file with code as follows:开发者_运维知识库 <s:application..........>

I have created a simple mxml file with code as follows:

开发者_运维知识库
<s:application..........>
   <s:BorderContainer>
      <s:SkinnableContainer id="firstRow"/>
      <s:SkinnableContainer id="secondRow"/>
      <s:SkinnableContainer id="thirdRow"/>
   </s:BorderContainer>
</s:application>

Now I want to apply different font size, font color and font type and background color on each row i.e each of the three skinnableContainers.Currently I have defined 3 different skin classes for each of row but I think this is a bad programing. I should create a single skin class for outermost container i.e BorderContainer and any how provide different fonts and background color to all the 3 child containers through that skin class. So, is it possible that I can create single skin class that can provide different decorations to each of the child container.


You should use styles. Here is the sample of it.

0

精彩评论

暂无评论...
验证码 换一张
取 消