You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a multiple column layout is used (by setting span() on Fields) the labels are placed too close to the previous value. This behavior is accentuated when short labels are used. The following screenshots show this behavior with a 2 and a 4 column layout.
The code used for these examples is
import com.dlsc.formsfx.model.structure.Field;
import com.dlsc.formsfx.model.structure.Form;
import com.dlsc.formsfx.model.structure.Group;
import com.dlsc.formsfx.view.renderer.FormRenderer;
import com.dlsc.formsfx.view.util.ColSpan;
import javafx.application.Application;
import javafx.beans.property.SimpleStringProperty;
import javafx.beans.property.StringProperty;
import javafx.scene.Scene;
import javafx.stage.Stage;
public class Sample extends Application {
@Override
public void start(Stage stage) throws Exception {
StringProperty p1 = new SimpleStringProperty("p1");
StringProperty p2 = new SimpleStringProperty("p2");
StringProperty p3 = new SimpleStringProperty("p3");
StringProperty p4 = new SimpleStringProperty("p4");
Form form = Form.of(
Group.of(
Field.ofStringType(p1)
.label("P1")
.required(true).span(ColSpan.QUARTER),
Field.ofStringType(p2)
.label("P2")
.required(true).span(ColSpan.QUARTER),
Field.ofStringType(p3)
.label("P3")
.required(true).span(ColSpan.QUARTER),
Field.ofStringType(p4)
.label("P4")
.required(true).span(ColSpan.QUARTER)
)
);
stage.setScene(new Scene(new FormRenderer(form)));
stage.sizeToScene();
stage.show();
}
}
It would be great to have an option to specify padding/spacing without having to override the default renderers nor providing a custom renderer.
The text was updated successfully, but these errors were encountered:
When a multiple column layout is used (by setting
span()
onField
s) the labels are placed too close to the previous value. This behavior is accentuated when short labels are used. The following screenshots show this behavior with a 2 and a 4 column layout.The code used for these examples is
It would be great to have an option to specify padding/spacing without having to override the default renderers nor providing a custom renderer.
The text was updated successfully, but these errors were encountered: