Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

Flex ListÐб³¾°É«

 ¹ýÈ¥ÔÚ¶ÔDataGridÉèÖÃÐб³¾°É«Ê±£¬¸Ð¾õ»¹ÊÇͦ·½±ãµÄ£¬Ö»ÒªÖØÐ´DataGridµÄ£¬ÈçÏÂ
private var _rowColorFunction:Function;
public function set rowColorFunction(f:Function):void
{
this._rowColorFunction = f;
}
public function get rowColorFunction():Function
{
return this._rowColorFunction;
}
override protected function drawRowBackground(s:Sprite, rowIndex:int, y:Number, height:Number, color:uint, dataIndex:int):void
{
if (this.rowColorFunction != null) {
if (dataIndex < this.dataProvider.length) {
var item:Object = this.dataProvider.getItemAt(dataIndex);
color = this.rowColorFunction.call(this, item, color);
}
}
super.drawRowBackground(s, rowIndex, y, height, color, dataIndex);
}

Èç¹ûÄ㻹ÊDz»ÊǺÜÃ÷°×¿ÉÒԲο¼ÎÒÒÔǰµÄ²©¿Íhttp://blog.csdn.net/terryzero/archive/2009/10/12/4657277.aspx
½ñÌìÎÒÅöµ½¸öÐèÇóÊÇÒª¶ÔListÐбäÉ«£¬ÓÉÓÚÎÒÏëDataGridºÍList¶¼ÊǼ̳ÐÓëListBase,¶¼ÓÐ override protected function drawRowBackground(s:Sprite, rowIndex:int, y:Number, height:Number, color:uint, dataIndex:int):void
Õâ¸ö·½·¨£¬ËùÒÔÎÒ¾ÍÏ뵱Ȼ£¬ÕÕºù«»­Æ°£¬Ò²ÖØÐ´ÁËÕâ¸ö·½·¨£¬µ«¾­¹ýµ÷ÊÔÔõôҲµ÷Óò»µ½Õâ¸ö·½·¨¡£¸ãµÄÎҷdz£·Ñ½â£¬ÄѵÀÕâ¸ö·½·¨Ã»Óõİ¡£¿ÍøÉϲéÁ˺þ㬹úÄÚûɶÕâ·½ÃæµÄºÃÎÄÕ£¬Í»È»Ò»Æª¹úÍâµÄÎÄÕÂÆô·¢ÁËÎÒ¡£ÈçÏÂ
All the listy components in Flex (List, Datagrid, Tree, etc.) have a protected method called drawRowBackground which is in charge of drawing the background for a given row. You typically use it to color a given row based on some facet of the data the row represents (e.g. red background for rows with a negative bank balance).
With DataGrid, it's easy to use, just subclass DataGrid and override the method, parameterized so you can pass in a function to compute the color for each row based on the row index/data/original color/etc. With List (and since ComboBox uses a


Ïà¹ØÎĵµ£º

flex ModuleLoader ERROR¼Ç¼

sdk3.2 Ï»áÓдËÎÊÌâ.
ÏîÄ¿ÖÐÏëÓÃmoduleLoader¼ÓÔØÄ£¿é,´ïµ½Ä£¿é»¯¿ª·¢µÄÄ¿µÄ.µ«ÊdzöÏÖÁ˹²Ïí±äÁ¿µÄÎÊÌâ:
TypeError: Error #1034: Ç¿ÖÆ×ª»»ÀàÐÍʧ°Ü:ÎÞ·¨½« Object@406e651 ת»»Îª mx.messaging.messages.IMessage¡£
´úÂë+ÉÏ//   import mx.managers.PopUpManager;
//   private var popUpManage ......

FlexÖÐÎİïÖú µÚÎåÕ FlexʹÓÃÐÐΪ

µÚÎåÕ FlexʹÓÃÐÐΪ
Adobe FlexÐÐΪʹÄã¿ÉÒÔΪӦÓóÌÐòÌí¼Ó¶¯»­ºÍÔ˶¯£¬À´¶ÔÓû§ºÍ±à³Ì»î¶¯×÷³ö·´Ó¦¡£ÐÐΪ£¬ÊÇÓÉÒ»¸ö´¥·¢Æ÷ºÍÒ»ÖÖЧ¹û×éºÏ¶ø³É¡£´¥·¢Æ÷ÊÇÒ»Öֻ£¬ÈçÊó±êÔÚ×é¼þÉϵã»÷£¬×é¼þ»ñµÃ½¹µã£¬»ò×é¼þ¿É¼û¡£Ð§¹ûÊÇÔÚÄ¿±ê×é¼þÉϵĿÉÊÓÐÔ»ò¿ÉÌýÐÔÉϵÄijÖֱ仯£¬ÒÔºÁÃë¼ÆË㡣Ч¹ûµÄÀý×Ó°üÀ¨µ­³ö£¬³ß´ç±ä»¯£¬»òÕß×é¼þ· ......

Flex ±àÒë²ÎÊý

ÏÂÃæÊÇһЩ³£¼ûµÄ±àÒëÆ÷²ÎÊý£º
1£¬¡¾verbose-stacktraces¡¿
Ö¸¶¨SWFÔÚÔËÐÐʱÒì³£ÐÅÏ¢Öаüº¬ÐкźÍÎļþÃû£¬Õ⽫ʹ²úÉúµÄSWFÎļþ¸ü´óЩ£¬´ø
verbose-stacktracesµÄSWF»¹ÊǺ͵÷ÊÔ°æ±¾µÄSWFÓÐÇø±ðµÄ¡£
2£¬¡¾source-path path-element¡¿
Ìí¼ÓÆäËûÔ´´úÂëĿ¼»òÎļþ£¬¿ÉÒÔʹÓÃͨÅä·ûÀ´Ìí¼ÓĿ¼ÖÐËùÓÐÎļþ»ò×ÓĿ¼£¬Ò²¿ÉÊ ......

flex »ñµÃµ±Ç°ÈÕÆÚ

    var formatter:DateFormatter = new DateFormatter();
    formatter.formatString = "YYYY-MM-DD JJ:NN:SS";
    Alert.show(formatter.format(new Date())); ......

flexÌØÐÔ¼°ÓÅȱµã

±¾Ìùת×Ô£ºhttp://smartblack.javaeye.com/blog/556202
 Ò»Ïî¼¼Êõ£¬´Ó¸ÅÄîÌá³öµ½¼¼ÊõÑз¢µ½ÉÌÒµ·¢²¼£¬ÔÙµ½Êµ¼ÊÓ¦Óã¬×îÖÕ½«²úÆ·³ÊÏÖÔÚÓû§ÃæÇ°£¬ÕâÊÇÒ»¸öÂþ³¤¶ø¸´ÔӵĹý³Ì¡£ÔÚÕâµ±ÖУ¬ºÜ¶àÓд´ÒâÓÐÉúÃüÁ¦µÄ¼¼ÊõÒòΪ¸÷ÖÖÔ­ÒòССÒź¶µØ²»ÐÒØ²ÕÛÁË¡£FlexÄÜ×ßµ½½ñÌìȷʵ²»Ò×£¬ÏÂÃæÈÃÎÒÃÇ´Ó²»Í¬µÄ½Ç¶ÈÀ´¿´Ò»ÏÂËüÊÇÈçºÎ¹ý¹ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ