问题
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