mikehearn
04/13/2017, 2:53 PMmikehearn
04/13/2017, 2:53 PMmikehearn
04/13/2017, 2:53 PMron
04/13/2017, 2:56 PMPasted image at 2017-04-13, 4:56 PM▾
ron
04/13/2017, 2:56 PMron
04/13/2017, 2:57 PMmikehearn
04/13/2017, 3:04 PMron
04/13/2017, 3:05 PMgtnarg
04/13/2017, 3:07 PMron
04/13/2017, 3:08 PMgtnarg
04/13/2017, 3:09 PMron
04/13/2017, 3:11 PMgtnarg
04/13/2017, 3:12 PMedvin
04/13/2017, 3:54 PMedvin
04/13/2017, 3:56 PMedvin
04/13/2017, 4:09 PMedvin
04/13/2017, 4:11 PMedvin
04/13/2017, 4:11 PMedvin
04/13/2017, 4:20 PMedvin
04/13/2017, 4:20 PMedvin
04/13/2017, 4:30 PMfield
builder is only available on fieldset
, so even if you create those vboxes and hboxes, the fields are only added to the fieldset directly. That's why the layout doesn't change.edvin
04/13/2017, 4:35 PMField
expects it's parent to be a Fieldset
.edvin
04/13/2017, 4:57 PMField
, Fieldset
and Form
expect direct children. We could rewrite that, or make Fieldset
into a Pane
and do the layout ourselves there. The most intuitive for users might be to support any kind of layout inside a fieldset. Let me give that a shot after dinner.edvin
04/13/2017, 5:45 PMedvin
04/13/2017, 5:46 PMFieldset
. Your original code will now work as expected, though you might want to add some spacing to the surrounding hbox. For example hbox(20) { .. }
.edvin
04/13/2017, 5:47 PMedvin
04/13/2017, 5:48 PMfield("Node Name", op = { nodeNameField() })
can be written as field("Node Name") { nodeNameField() }
. Looks cleaner. I normally also recommend creating the field inside the builder, but that's a matter of preference I guess.edvin
04/13/2017, 5:49 PMImproved Form layout▾
edvin
04/13/2017, 5:53 PMfieldset("FieldSet", labelPosition = Orientation.VERTICAL)
you get: