在羽毛自定义 itemrenderer dataprovider 上实时更改标签
Changing the label in real-time on feathers custom itemrenderer dataprovider
Starling/Feathers CustomItemRenderer.as 脚本允许您设置标签的文本值,并且可以在 Main.as:
中这样做
myList.dataProvider.getItemAt(index).label = textInput.text;
但是,问题在于此标签仅在列表中的项目被修改或事件为 called/dispatched 时才会明显更新。
我想要的是将标签的文本值设置为用户 types/enters 在 textInput 中的值。我不知道如何将(列表中的选定项目)标签定位为 myList 的子项,并且不能简单地使用上面的行,因为它不会实时更新标签。
使用 DataProvider
对象的 invalidateItem() or the invalidateItemAt() 方法强制更新。
Starling/Feathers CustomItemRenderer.as 脚本允许您设置标签的文本值,并且可以在 Main.as:
中这样做myList.dataProvider.getItemAt(index).label = textInput.text;
但是,问题在于此标签仅在列表中的项目被修改或事件为 called/dispatched 时才会明显更新。
我想要的是将标签的文本值设置为用户 types/enters 在 textInput 中的值。我不知道如何将(列表中的选定项目)标签定位为 myList 的子项,并且不能简单地使用上面的行,因为它不会实时更新标签。
使用 DataProvider
对象的 invalidateItem() or the invalidateItemAt() 方法强制更新。