How to remove Space between disclosure panels
Hi All, I am trying to add 2 disclosure panels to main panel (vertical panel) but the promblem is that I am gettign a space in between disclosure panels even after I set the width properly. Here is the sample code SimplePanel simPanel = new SimplePanel(); simPanel.setHeight(400px); simPanel.setWidth(1000px); DisclosurePanel disPanel1 = new DisclosurePanel(Requests); disPanel1.setContent(simPanel); DisclosurePanel disPanel2 = new DisclosurePanel(Inbox); disPanel2.setContent(simPanel); VerticalPanel vPanel = new VerticalPanel(); vPanel.add(disPanel1 ); vPanel.add(disPanel2); vPanel.setSpacing(0); I have added the above vertical panel in my DockPanel center. when I open the disclosure panels then the space is getting adjusted but whenever I close the panels I am seeing some space in between the panels. Is there anyway I can Place these panels together even in the close position. I appreciate your help. Thanks, Satish -- 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.
Re: How to remove Space between disclosure panels
Hi zix, Thanks for your quick reply. As you mentioned I have added my 2 disclosure panels in a DockLayout panel.But still I am seeing the spacing problem between the panels.What I am expecting is that whenevr I close the first disclosure panel then the second panel should occupy the remaining space.Am I missing any width setting here. DisclosurePanel disPanel1 = new DisclosurePanel(Requests); disPanel1.setContent(simPanel); DisclosurePanel disPanel2 = new DisclosurePanel(Inbox); disPanel2.setContent(simPanel); DockLayoutPanel dockPanel = new DockLayoutPanel(Unit.PX); dockPanel.addNorth(disPanel1 ,150); dockPanel.add(disPanel2 ); DockLayoutPanel mainPanel = new DockLayoutPanel(Unit.PX); mainPanel .addNorth(Menu ,150); mainPanel .add(dockPanel ); Thanks, Satish On Dec 21, 1:24 pm, zixzigma zixzi...@gmail.com wrote: use DockLayoutPanel, and use your other panels within regions of DockLayoutPanel. DockLayoutPanel, can have multiple north region, multiple west, multiple east, you can have DockLayoutPanels within DockLayoutPanels. avoid using Vertical/Horizontal Panel, in favor of DockLayoutPanel/ FlowPanel/SimplePanel. Vertical/Horizontal panels uses HTMl table underneath, wich many CSS designers hate. those other panels I mentioned, produce simple divs an example of how to use DockLayoutPanel in the fashion I described can be found in GWT Mail Example: http://code.google.com/p/google-web-toolkit/source/browse/trunk/sampl... -- 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.
Re: couldn't add push button to the DOM
Thanks for your quick response Amir. Looks like it is working if I add it through UIBInder. satish On Dec 17, 6:11 am, Amir Kashani amirkash...@gmail.com wrote: There's a few subtle and important steps that GWT takes when attaching a widget to the DOM. Generally, you shouldn't try to do this manually. Rather, take a look at HTMLPanel -- it supports mixing Widgets with HTML markup. If the markup is complicated, it's probably worth using UiBinder. - Amir -- 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.
couldn't add push button to the DOM
Hi, I am trying to create a simple header with caption and close button at the right end. I have created simple table with single row having two columns. I have added label in the first column and close button image in the next column. It is working fine when I added the image but not working when I add push button instead of image. Please let me know if I am doing anything wrong. Public class DefaultHeader extends Widget implements ClickHandler{ private final Element labelTD; private final Element imageTD; private Image iconImage; interface DefaultImages extends ClientBundle { ImageResource closebtn(); } private static final DefaultImages DEFAULT_IMAGES = GWT.create(DefaultImages.class); public DefaultHeader(String text){ this(DEFAULT_IMAGES.closebtn(),text); } public DefaultHeader(ImageResource image, String text) { iconImage = new Image(image); // I do not need any Widgets here, just a DOM structure. Element root = DOM.createTable(); Element tbody = DOM.createTBody(); Element tr = DOM.createTR(); imageTD = DOM.createTD(); labelTD = DOM.createTD(); setElement(root); DOM.appendChild(root, tbody); DOM.appendChild(tbody, tr); DOM.appendChild(tr, labelTD); DOM.appendChild(tr, imageTD); // set image TD to be same width as image. DOM.setElementProperty(labelTD, align, left); DOM.setElementProperty(imageTD, align, right); DOM.setElementProperty(imageTD, valign, middle); DOM.setStyleAttribute(imageTD, width, iconImage.getWidth() + px); DOM.setStyleAttribute(labelTD, width, 100%); PushButton closeButton = new PushButton(iconImage); closeButton.addClickHandler(this); setButton(closeButton); //setImage(iconImage); setText(text); } public final String getText() { return DOM.getInnerText(labelTD); } public final void setText(String text) { DOM.setInnerText(labelTD, text); } public final void setButton(PushButton button) { DOM.appendChild(imageTD, button.getElement()); } public final void setImage(Image image) { iconImage = image; DOM.appendChild(imageTD, iconImage.getElement()); } public final Image getImage() { return iconImage; } @Override public void onClick(ClickEvent event) { this.setVisible(false); } } Satish -- 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.