Flex 4 :使用 Halo 主题
此例展示了如何在 Flex 4 中为 Halo 控件设置旧的 Halo 皮肤,而不是新的 Spark 皮肤。
<?xml version="1.0" encoding="utf-8"?>
<!-- http://www.slsay.com/archives/131 -->
<s:Application name="Spark_Halo_theme_test"
xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/halo">
<s:VGroup horizontalCenter="0" verticalCenter="0" >
<s:Button id="sBtn"
label="I'm a Spark Button" />
<mx:Button id="hBtn"
label="I'm a Halo Button" />
</s:VGroup>
</s:Application>
最后,需要用 halo.swc 主题改变 Flex 编译器的参数:
在 Flash Builder 4 的主菜单中选择 Project -> Properties
从左边的菜单中选择 Flex 编译器
在 Additional compiler arguments 中,添加如下参数:
-theme=${flexlib}/themes/Halo/halo.swc
点击 OK 按钮,应用更改并关闭对话框
重新编译并运行应用程序
英文原文:http://blog.flexexamples.com/2009/07/14/using-the-halo-theme-in-flex-4/
本文转自:http://www.slsay.com/archives/131
相关文档:
<?xml version="1.0" encoding="utf-8"?>
<!-- Simple example to demonstrate the DateTimeAxis class. -->
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
<mx:Script>
import mx.collections.ArrayCollection;
......
<mx:TextArea
width=
"200"
height=
"100"
>
<mx:htmlText>
This is an example of setting a <B>
TextArea</B>
control's <I>
htmlText<I>
property.
</mx:htmlText>
</mx:TextArea>
支持的样式标记
< ......
一共花了9天时间写出来,其中也停滞过
主要原因是效率问题,而重新构建,进行从新优化就用了2天,也总结了很多经验吧。
基本实现了 左边一颗表格树,当展开时候甘特图也展开,关闭时甘特图也关闭,而且横向进度可以左右移动,扩大缩小,连接线
也根据位置自动变换连接 当子进度移动或扩大时,父进度也跟着放大缩小移动, ......
Flex 4带给我们的,是全新的命名空间。了解这些命名空间必定是一件好事情。Flex 4有三个非常重要的命名空间,分别是:
xmlns:fx=”http://ns.adobe.com/mxml/2009″
xmlns:mx=”library://ns.adobe.com/flex/halo”
xmlns:s=”library://ns.adobe.com/flex/spark”
1、xmlns:fx=&rdqu ......