SmartClient Version: v9.0p_2013-11-05/LGPL Development Only (built 2013-11-05)
Browser: Chrome, Firefox
When I autosize a form and place it in an autosized layout, the layout height is not correct in Chrome and Firefox. It is correct in IE9/10.
If I load the following control, in Chrome and Firefox I see a couple of strange things. Using the browser development tools I can see that the form element is 27px high, but the layout it is place in is 30px high. Second, the form background color is set to green, and the layout to red. However on the display, the green covers the entire 30px of height (I would expect to see 3px of red on the bottom).
The result of this not only is the layout taking up extra vertical space, but the form does not appear vertically centered in the layout as expected (and what I am trying to accomplish).
In IE9 however, the form and the layout both have a height of 26px. This is nice and compact (no extra space) and leaves the form looking verically centered in the area that contains it.
Browser: Chrome, Firefox
When I autosize a form and place it in an autosized layout, the layout height is not correct in Chrome and Firefox. It is correct in IE9/10.
If I load the following control, in Chrome and Firefox I see a couple of strange things. Using the browser development tools I can see that the form element is 27px high, but the layout it is place in is 30px high. Second, the form background color is set to green, and the layout to red. However on the display, the green covers the entire 30px of height (I would expect to see 3px of red on the bottom).
The result of this not only is the layout taking up extra vertical space, but the form does not appear vertically centered in the layout as expected (and what I am trying to accomplish).
In IE9 however, the form and the layout both have a height of 26px. This is nice and compact (no extra space) and leaves the form looking verically centered in the area that contains it.
Code:
public class FormVAlign extends Layout { public FormVAlign() { SelectItem item = new SelectItem("name", "title"); item.setTitleAlign(Alignment.RIGHT); item.setWidth("100%"); DynamicForm form = new DynamicForm(); form.setWidth100(); form.setAutoHeight(); form.setBackgroundColor("green"); form.setItems(item); Layout layout = new Layout(); layout.setWidth100(); layout.setAutoHeight(); layout.setBackgroundColor("red"); layout.addMember(form); addMember(layout); } }
Comment