我在 MXML 组件中有数字步进器。当我手动输入数值并按下按钮以在我的 datagrid 列行中添加当前值时。第一次它在 datagrid 列中没有影响。但是当我点击我的 datagrid 列中的第二次值时. 我如何在第一次单击按钮时在 datagrid 列中手动输入值。
谢谢提前!!!
受保护的函数 id_btnAdd_mouseDownHandler(event:MouseEvent):void { { edlColor = new EDLColor(); edlColor.ColorToString = "rgb(0,0,0)";
edlColor.Extent = id_extent.value; elxFrame.ShapeStyle.ColorList.AddColor(edlColor); dispatchEvent(new ECContextChangeEvent(ECContextChangeEvent.CONTEXT_CHANGE, this, edlColor, ContextConstants.COLOR_CONTEXT)); } //edlColor = new EDLColor(); //colorList.AddColor(color);
}
//上面这个函数用于在datagrid列中添加数字步进器的值
-->
<mx:Spacer width="90%"/>
<customclasses:IconButton id="id_btnAdd" name="{TDCommonConstants.IMAGE}"
skinClass="assets.skins.designer.IconButtonSkin"
icon="{Icons.Add}"
mouseOverIcon="{Icons.Add}"
mouseDownIcon="{Icons.Add}"
toolTip="{resourceManager.getString(TDCommonConstants.RESOURCE_LABELS,'ADD')}"
mouseDown="id_btnAdd_mouseDownHandler(event)"
height="12" width="10"/>
<customclasses:IconButton id="id_btnRemove" name="{TDCommonConstants.IMAGE}"
skinClass="assets.skins.designer.IconButtonSkin"
icon="{Icons.Remove}"
mouseOverIcon="{Icons.Remove}"
mouseDownIcon="{Icons.Remove}"
toolTip="{resourceManager.getString(TDCommonConstants.RESOURCE_LABELS,'REMOVE')}"
mouseDown="id_btnRemove_mouseDownHandler(event)"
height="12" width="10"/>
</s:HGroup>
<s:HGroup height="90%" width="100%">
<mx:DataGrid id="id_variableRefList" width="100%" height="95%">
<mx:columns>
<mx:DataGridColumn id="id_strip" sortable="false" >
<mx:itemRenderer>
<fx:Component>
<mx:HBox width="100%" height="100%" backgroundColor="{data.UnsignedInt}" mouseDown="{outerDocument.hbox1_mouseDownHandler(event)}">
</mx:HBox>
</fx:Component>
</mx:itemRenderer>
</mx:DataGridColumn>
<mx:DataGridColumn id="id_opacity" sortable="false"/>
</mx:columns>
</mx:DataGrid>
</s:HGroup>
</s:VGroup>