Hi
I try to create vertical separator by used VerticalLayout, but have a problem with width like 2px.
Vaadin is create width like ~30px
My code is:
class AutorizationWindow extends HorizontalLayout{
public AutorizationWindow() {
setSizeFull();
//Vertical divider
VerticalLayout vDivider = new VerticalLayout();
vDivider.setWidth(2,Unit.PIXELS); //I need 2px separator
vDivider.setHeight(100,Unit.PERCENTAGE);
vDivider.addStyleName("color_ligth"); //Ligth color for separator
//Autorization form
FormLayout form = new FormLayout();
form.setWidthUndefined();
form.setMargin(true);
TextField tf1 = new TextField("User");
tf1.setIcon(VaadinIcons.USER);
tf1.setRequiredIndicatorVisible(true);
tf1.setWidth("250px");
TextField tf2 = new TextField("Password");
tf2.setIcon(VaadinIcons.PASSWORD);
tf2.setRequiredIndicatorVisible(true);
tf2.setWidth("250px");
Button button = new Button("Enter");
button.setStyleName(ValoTheme.BUTTON_FRIENDLY);
button.setWidth("250px");
form.addComponents(tf1,tf2,button);
addComponents(vDivider,form);
setComponentAlignment(vDivider,Alignment.MIDDLE_LEFT);
setComponentAlignment(form,Alignment.MIDDLE_RIGHT);
setExpandRatio(vDivider,0.1f);
setExpandRatio(form,0.9f);
}
}