Quantcast
Channel: SmartClient Forums
Viewing all articles
Browse latest Browse all 4756

Layouting issues

$
0
0
I added a minimalistic example of the problem as code-snippet below, and the result as attachment.

in short: I have a VLayout and add an HStack to it, I'd expect that it is positioned on top, the upper end of the page, but instead there's some gap (quite big gap). There's no CSS applied from my side.

How can I get rid of this gap?

Version: SmartClient Version: v9.0p_2013-09-19/PowerEdition Deployment (built 2013-09-19)

Browsers: Firefox 24<, Google Chrome 31<

Code:

package org.yournamehere.client;

import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.core.client.GWT;
import com.google.gwt.event.shared.HandlerManager;
import com.google.gwt.user.client.ui.RootPanel;
import com.smartgwt.client.types.Alignment;
import com.smartgwt.client.types.VerticalAlignment;
import com.smartgwt.client.widgets.layout.VLayout;
import com.smartgwt.client.widgets.Label;
import com.smartgwt.client.widgets.layout.HStack;

public class Entry implements EntryPoint {

    public Entry() {
    }

    @Override
    public void onModuleLoad() {
        final GWTServiceAsync service = GWT.create(GWTService.class);
        final HandlerManager eventBus = new HandlerManager(null);

        RootPanel.get().add(new TestLayout());
    }
   
    public class TestLayout extends VLayout {
        private final Label label;
       
        public TestLayout() {
            setWidth("100%");
            setHeight("100%");
            setAlign(VerticalAlignment.TOP);
            label = new Label("test");
            HStack top = new HStack();
            top.setBackgroundColor("lightgrey");
            top.setHeight("25px");
            top.setWidth("100%");
            top.setAlign(Alignment.RIGHT);
            top.addMember(label);
           
            addMember(top);
        }
    }

}

Please let me know if you need any further information.

Attached Images
File Type: png Untitled000.png (36.8 KB)

Viewing all articles
Browse latest Browse all 4756

Trending Articles