FLEX 4数字步进值更新问题?
|
我在MXML组件中有数字步进器。当我手动输入数字值并按一个按钮以将当前值添加到我的datagrid列行中时。第一次没有在datagrid列中生效。但是当我单击第二次在我的datagrird列中生效时。
第一次单击按钮时如何在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>
没有找到相关结果
已邀请:
1 个回复
购藏盗码韦
这将触发DataGrid更新。您还可以使用refresh方法:
但是,考虑到您提供的代码不足,我只是在猜测。