-
20 Jul 2008 2:22 PM #1
set FlowLayout margins
set FlowLayout margins
hi,
I tried to set a margin between all the 3 FormPanels in
GWT 1.5
GXT 1.0.1
hosted and browser mode
with this code :
I also triedCode:public class Test extends LayoutContainer implements EntryPoint { /** * This is the entry point method. */ public void onModuleLoad() { // layout FlowLayout layout = new FlowLayout(20); setLayout(layout); ContentPanel form1 = new FormPanel(); form1.setHeading("form1"); ContentPanel form2 = new FormPanel(); form2.setHeading("form2"); ContentPanel form3 = new FormPanel(); form3.setHeading("form3"); TextField field1 = new TextField(); field1.setFieldLabel("field"); TextField field2 = new TextField(); field2.setFieldLabel("field"); TextField field3 = new TextField(); field3.setFieldLabel("field"); form1.add(field1); form1.setCollapsible(true); form1.setAnimCollapse(false); form2.add(field2); form2.setCollapsible(true); form2.setAnimCollapse(false); form3.add(field3); form3.setCollapsible(true); form3.setAnimCollapse(false); add(form1); add(form2); add(form3); RootPanel.get().add(this); } }andCode:layout.setMargin(20);
with no more luck.Code:add(form1, new FlowData(20);
all my FormPanel are stick together with no spacing
-
20 Jul 2008 2:31 PM #2
try
Code:add(form1, new MarginData(20));
Last edited by gslender; 20 Jul 2008 at 2:32 PM. Reason: missing close brackett
-
20 Jul 2008 2:45 PM #3
-
20 Jul 2008 3:53 PM #4
This...
produced this on WinXP ie6 and FF3Code:add(form1,new MarginData(10)); add(form2,new MarginData(20)); add(form3,new MarginData(30));
ps - I also removed the 20 out of new FlowLayout(20) - not that this impacted the render
-
20 Jul 2008 6:49 PM #5
produced this on Ubuntu 8.04 Hosted mode and FF3
-
21 Jul 2008 2:57 AM #6
I tested against
GWT 1.5
GXT 1.0
on Win 2003
hosted mode : work
ie6 : work
firefox 3 : don't work ...
same thing with GXT 1.0.1
-
22 Jul 2008 3:49 AM #7
Mmm, it seems that we still have some differences between browsers/OS. Darell, wouldn't it be helpful to declare the HTML 4 doctype instead of HTML 3 ? Look at http://extjs.com/forum/showthread.php?t=38334
-
22 Jul 2008 4:31 AM #8
Thank zaccret and gslender for your help.
wrong doctype... I apologize
I think I will write my own applicationCreator for gxt.
-
22 Jul 2008 4:44 AM #9
That's not a bad idea.
Actually, it would be nice if Darell could integrate it in gxt bundle.
-
31 Jul 2008 4:56 AM #10


Reply With Quote