As far as I know the less you blur your code with theming stuff the better. Using css will help you on maintaining everything, because the gwt code will be cleaner and more meaningful :)
2010/3/27 Marcelo Sena <[email protected]> > Hi, I'm trying to center things at a page: > public void onModuleLoad() { > DockLayoutPanel panelThatCenters = new DockLayoutPanel(Unit.PX); > panelThatCenters.add(new Label("OLOLOLOLL")); > panelThatCenters.setSize("100%", "100%"); > RootLayoutPanel.get().setSize("100%", "100%"); > RootLayoutPanel.get().add(panelThatCenters); > } > > But this code seems to have no effect on the DockLayoutPanel, so I saw > the RootLayout documentation an thought about this: > public void onModuleLoad() { > Label myLabel = new Label("^^"); > LayoutPanel p = new LayoutPanel(); > p.add(myLabel); > p.setWidgetLeftWidth(myLabel, 50, Unit.PCT, 100, Unit.PCT); > RootLayoutPanel rp = RootLayoutPanel.get(); > rp.add(p); > } > > Is this the right way to do it? Would it be better to use css? > > -- > 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]<google-web-toolkit%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/google-web-toolkit?hl=en. > > -- 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.
