flex 實(shí)現(xiàn)全文檢索中的高亮顯示代碼
更新時(shí)間:2009年06月04日 17:54:17 作者:
關(guān)鍵是重寫了 override public function set data(value:Object):void 方法
復(fù)制代碼 代碼如下:
<mx:DataGrid id="dg" click="select()" dataProvider= "{modelLocator.resultList}" borderStyle="none"
verticalGridLines="false" horizontalGridLines="false" verticalScrollPolicy="off" rowCount="10"
fontSize="16" fontStyle="normal" fontThickness="0" width="100%" height="100%">
<mx:columns>
<mx:DataGridColumn dataField="programName " headerText="節(jié)目名稱" >
<mx:itemRenderer>
<mx:Component>
<mx:HBox width="100%" height="100%" horizontalAlign="left" verticalAlign="middle" horizontalScrollPolicy="off" verticalScrollPolicy="off">
<mx:Script>
<![CDATA[
import mx.controls.Alert;
override public function set data (value:Object):void
{
if(value != null)
{
super.data = value;
programXYZ.htmlText = data.programName;
//Alert.show(this.programXYZ.text);
}
}
]]>
</mx:Script>
<mx:Text id="programXYZ" />
</mx:HBox>
</mx:Component>
</mx:itemRenderer>
</mx:DataGridColumn>
</mx:columns>
</mx:DataGrid>
關(guān)鍵是重寫了 override public function set data(value:Object):void 方法
相關(guān)文章
Flex 全屏組件 部分全屏的實(shí)現(xiàn)代碼
一般情況下,F(xiàn)lex全屏是指將整個(gè)舞臺(tái)全屏,而不是待定的組件全屏.網(wǎng)上的例子也一般是指這種情況的.2009-09-09
Flex 非常實(shí)用的學(xué)習(xí)資料整理
對(duì)于學(xué)習(xí)flex 的朋友,絕對(duì)是個(gè)不錯(cuò)的一些資料,大家可以用ctrl+F搜索獲取2009-01-01
Flex與.NET互操作(十二):FluorineFx.Net的及時(shí)通信應(yīng)用(Remote Shared Objects
遠(yuǎn)程共享對(duì)象(Remote Shared Objects) 可以用來跟蹤、存儲(chǔ)、共享以及做多客戶端的數(shù)據(jù)同步操作。只要共享對(duì)象上的數(shù)據(jù)發(fā)生了改變,將會(huì)把最新數(shù)據(jù)同步到所有連接到該共享對(duì)象的應(yīng)用程序客戶端。2009-06-06
Flex中讓鼠標(biāo)移至AdvancedDataGrid的行上不自動(dòng)修改顯示效果
公司項(xiàng)目中出于性能考慮,把mx:Repeater控件換成了mx:AdvancedDataGrid控件來顯示。2009-05-05

