widget remove itself

空扰寡人 提交于 2019-12-25 07:47:12

问题


i have widget like below

in ui.xml

 textbox, anchor_delete 

when anchor_delete is press, @uihandler fired and i want entire widget textbox and anchor_delete remove itself from the view. Is this possible

@UiHandler("anchor_delete")
void deleteRowAction(ClickEvent event) {

   getWidget().removeFromParent(); //i tried this but fail
}

回答1:


Did you try:

textbox.removeFromParent();
anchor_delete.removeFromParent();

Assuming both are widgets.



来源:https://stackoverflow.com/questions/4194125/widget-remove-itself

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!