2010-09-18 99 views
0

我有一個DataGrid列如下:Adob​​e Flex的itemEditor的

<mx:DataGridColumn 
headerText="Description" 
dataField="description" 
editable="true"  
editorXOffset="2" editorYOffset="2" 
editorHeightOffset="20" editorWidthOffset="60" 
itemEditor="com.jono.controls.DgItemEditor" 
wordWrap="true" 
/> 

和一個非常簡單的DgItemEditor:

<?xml version="1.0" encoding="utf-8"?> 
<mx:TextArea xmlns:mx="http://www.adobe.com/2006/mxml" 
wordWrap="true" backgroundColor="#FFFFFF" backgroundAlpha="1"> 

</mx:TextArea> 

基本上,這使得當用戶編輯一個單元一個小的 '彈出'在數據網格中,允許輸入更多空間。我遇到的問題是數據網格網格線通過itemeditor顯示 - 即itemeditor是透明的。有什麼辦法可以強迫它變得不透明嗎?

回答

0

首先嚐試設置backgroundColor="0xFFFFFF"的值......它期望有一個uint,而不是一個字符串。這可能會讓人困惑,因爲當你使用CSS樣式表時,使用散列格式(#FFFFFF)。

如果失敗,您可以嘗試將TextArea放置在您的itemEditor的Canvas中。在畫布上設置backgroundColor =「0xFFFFFF」,backgroundAlpha =「1.0」。

+0

這兩個選項都不能工作 – JonoB 2010-09-18 16:54:24