If you are using flextables for forms you will want to set the width of the first column widgets:
flextable.getCellFormatter().setWidth(0, "200px"); On Feb 2, 7:26 pm, Name256 <abel.bi...@gmail.com> wrote: > Hello to you all, > it is my first time trying out GWT and I am using version 1.7. I have > been trying to create a login widget that contains help information on > the left and a login form on the right. I have been unable to align > the login SImple Panel to the centre of the east side of the > dockpanel. My code is below. Kindly assist on a way that this could be > possible. > > kind regards. > Abel > > public void createInformationWidget() { > HTML html = new HTML(); > html.setWordWrap(true); > html.setHTML("<p>Lorem ipsum dolor sit amet, consectetur > adipiscing elit. " + > "Pellentesque sit amet eros. Fusce dui. Duis aliquet > dapibus dui. Mauris vitae eros. </p>" + > "<p>Morbi euismod felis eget tellus. Maecenas ut metus > a nunc congue molestie. Nulla odio. " + > "Aenean sollicitudin. Duis eu massa feugiat enim > egestas ultrices. Nulla facilisi. Vestibulum " + > "ante ipsum primis in faucibus orci luctus et ultrices > posuere cubilia Curae; Nunc dictum risus a " + > "lacus. Fusce tempus arcu non tortor. Nulla > pellentesque lectus eu dui.</p>" + > "<p> Donec ac mi id massa accumsan sollicitudin. Donec > consequat sapien ut augue. " + > "Nullam erat dui, ultricies a, ullamcorper et, congue > at, nisi. Fusce porta convallis augue. " + > "Phasellus ullamcorper pharetra nisi. </p>"); > > dockPanel.add(html); > html.setWidth("50%"); > } > > public void createLoginForm() { > SimplePanel panel = new SimplePanel(); > > FlexTable flexTable = new FlexTable(); > flexTable.setCellSpacing(10); > flexTable.setWidget(0, 0, new Label("Email: ")); > flexTable.setWidget(0, 1, new TextBox()); > flexTable.setWidget(1, 0, new Label("Password: ")); > flexTable.setWidget(1, 1, new PasswordTextBox()); > > //panel.add(flexTable); > dockPanel.add(flexTable); > dockPanel.setCellHorizontalAlignment(flexTable, > HasHorizontalAlignment.ALIGN_CENTER); > } -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.