Is UIObject#setVisible(false) functionally different from Widget#removeFromParent?
Besides, Is DialogBox#hide just a wapper call to UIObject#setVisible(false)?
Any practical examples?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
UIObject#setVisiblesets the CSS ‘display’ attribute on the element. If you have anHTMLPaneland call setVisible(false) on it, it will result in thisWhereas removeFromParent will remove the element from the DOM of your page. Again, if you had an
HTMLPanelattached to the body of your page and called removeFromParent() on it, you would go fromto
So once you’ve remove a widget from it’s parent, you will have to reattach it if you want to display it again.
As for your second question, I haven’t looked at the code for
DialogBox#hidebut I would say that it probably callssetVisible(false)at some point, among other things.