Flex 设置Datagrid Header的高度/颜色等样式

Categories: Flex; Tagged with: ; @ October 10th, 2010 11:26

写了两年多的AS程序, 直到今天才遇到设置Datagrid Header样式的需要….(Datagrid, 中文输入至少=打他狗日的), 先看效果:

image

(more…)

Flex中使用currentStateChange事件监听State变化

Categories: Flex; Tagged with: ; @ October 9th, 2010 0:12

StateChangeEvent.CURRENT_STATE_CHANGE(currentStateChange):
StateChangeEvent 类代表当组件的 currentState 属性更改时调度的事件。

中文API: http://www.adobe.com/livedocs/flex/3_cn/mx/events/StateChangeEvent.html

使用方法:

1. ActionScript中监听Event

ui.addEventListener(StateChangeEvent.CURRENT_STATE_CHANGE, onCurrentStateChange);

注意: 如果用在主程序Application creationComplete的响应方法中, 可能无法监听首个StateChange事件(进入初始State);

2. MXML中监听Event

currentStateChange="onCurrentStateChange(event)"

附录: 响应函数

/** On State Change . */
protected function onCurrentStateChange(event:StateChangeEvent):void {
	printLog("LastState: " + event.oldState + "; currentState" + currentState);
}

Trace信息:

LastState: StateEmployeesList; currentStateStateDeptMgt

Flex4 State itemCreationPolicy 设定State组件立即创建

Categories: Flex; Tagged with: ; @ October 7th, 2010 22:20

没怎么用过State, 据说Flex4中State有很大更新, 今天小用了下. 发现一个问题:

非Start State中的Component在Application Create complete后不能立即使用. 于是想到了之前常用的creationPolicy – 统统设置为ALL, 结果仍旧无济于事.

解决方法: 设定组件itemCreationPolicy="immediate".

(more…)

字符串连续空格处理 – 在线小工具(使用Flex与正则表达式创建)

Categories: Flex; Tagged with: ; @ October 3rd, 2010 22:05

功能: 将会替换所有的(连续)空格为”,”
原理: Flex中使用RegExp替换. (more…)

FREE ebook – Getting started with Adobe Flex (From IBM DB2) Flex快速入门

Categories: Flex; Tagged with: ; @ October 2nd, 2010 23:28

Getting started with Adobe® Flex® couldn’t be easier. Read this free ebook to:

  • Understand how to build rich internet applications using Flex
  • Learn how to work with Flex Builder to create, run and debug Flex applications
  • Understand how Flex works with Web services and databases like DB2®
  • Learn about the Flex programming basics using MXML® and ActionScript(TM)
  • Get up to speed with powerful features like data binding, view states, and charting
  • Practice with hands-on exercises

DB2社区的免费电子书 – Flex快速上手, 尚无中文版.

Go–> https://www.ibm.com/developerworks/wikis/display/db2oncampus/FREE+ebook+-+Getting+started+with+Adobe+Flex

更多DB2社区的免费电子书:  ibm.com/db2/books

Newer Posts <-> Older Posts



// Proudly powered by Apache, PHP, MySQL, WordPress, Bootstrap, etc,.