2
- VerticalLayout 내부의 구성 요소가 가장자리의 일부 패딩과 함께 배치되는 이유는 무엇입니까?
- 이 문제를 해결하는 방법은 무엇입니까?
아래 코드는이 문제를 보여줍니다세로 레이아웃 패딩
@Component
@UIScope
public class TestForm extends CustomComponent {
public TestForm() {
HorizontalLayout hlayout = new HorizontalLayout();
VerticalLayout vlayout = new VerticalLayout();
hlayout.setSizeFull();
vlayout.setStyleName("page");
Label label1 = new Label("Label1");
Label label2 = new Label("Label2");
hlayout.addComponent(label1);
vlayout.addComponent(label2);
hlayout.addComponent(vlayout);
setCompositionRoot(hlayout);
}
}
결과 : enter image description here
감사합니다!
, 당신은 (false)를 vlayout.setSpacing '와 그것을 제거 할 수 있습니다;' – Jouni