On Tuesday, June 28, 2011 1:39:53 PM UTC+2, RRRaney wrote:
Alisson,I made the following change, but still does not display.My.css
------
#ButtonContainer
{
Old:visibility: hidden;
New:display: none;
}-----------------------------------------------------------
David,I have tried to do something like you have suggested but I just
can't see any properties or functions of Element that look like what you
have shown.
David didn't suggest anything (in terms of code at least), he copy/pasted the code for UIObject.setVisible(Element,boolean), which is called by UIObject.setVisible(boolean).
As you'll see, when calling setVisible(true), you'll actually reset 'display' to its default value, which in your case would be the one set by your stylesheet with the #ButtonContainer class. That's why David said to either always use CSS, or always use setVisible.
It would be different if you set the display style locally, inline: <div id=ButtonContainer style="display: none">, where resetting to the default value would really dismiss the previous 'non' value, rather than "remove a local override".
Alternatively, you could *add* a "local override" using Document.get().getElementById("ButtonContainer").getStyle().setDisplay(Display.BLOCK) (no need for RootPanel if it's not to add child widgets).
It all boils done to knowing what you're doing, and knowing the tools you're using (and GWT is open-source, so it's more than easy to know what it does!)
-- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/e8bcHQP-8BQJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
No comments:
Post a Comment