Actually, SplitPanels are worse that I thought - fine if you put them in a
visible slot or widget, but unusable if you want to move them about (because
the two panels and the splitter are absolute and don't follow the splitpanel
outer to its new location)
That also appears to be the cause of not being able to create them in closed
DisclosurePanel - because they are not attached when they are set up, there
are no width/height/left/top values.
If you add a SplitPanel to one slot and move it to another, the innards end
up at 0,0
Or am I doing something wrong?
Ian
/*
* Set up the html
*/
String str = "";
str += "<div id='temp'";
str += " style='border:1px solid red;'>";
str += "x";
str += "</div>";
str += "x";
str += "<div id='temp2'";
str += " style='border:1px solid red;'>";
str += "x";
str += "</div>";
RootPanel.getBodyElement().setInnerHTML(str);
/*
* Create a splitpanel
*/
final HorizontalSplitPanel s = new HorizontalSplitPanel();
DOM.setStyleAttribute(s.getElement(), "border", "1px solid black");
RootPanel.get("temp").add(s);
s.setSize("100px", "100px");
/*
* Add the left and right panel
*/
HTML html;
html = new HTML("Hello");
s.setLeftWidget(html);
DOM.setStyleAttribute(html.getElement(), "border", "1px dashed blue");
html = new HTML("World");
s.setRightWidget(html);
DOM.setStyleAttribute(html.getElement(), "border", "1px dashed blue");
/*
* Stop for a look
*/
Window.alert("stop");
/*
* Move it
*/
RootPanel.get("temp2").add(s);
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google Web Toolkit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---