-
Bug
-
Resolution: Fixed
-
P4
-
7u6
If I place a TilePane inside a HBox, it creates extra space, which is not used. It seems, the more children I add to the TilePane, the larger the extra space becomes.
setMaxHeight() and so on, does not have any effect.
This is related toRT-20209.
Sample:
import javafx.application.Application;
import javafx.geometry.Orientation;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.layout.HBox;
import javafx.scene.layout.TilePane;
import javafx.scene.layout.VBoxBuilder;
import javafx.stage.Stage;
public class TestApp4 extends Application {
public static void main(String[] args) {
launch(args);
}
@Override
public void start(final Stage stage) throws Exception {
HBox root = new HBox();
TilePane tilePane = new TilePane();
tilePane.setStyle("-fx-border-color:red");
tilePane.setOrientation(Orientation.HORIZONTAL);
tilePane.setPrefColumns(5);
//tilePane.setMaxHeight(Control.USE_PREF_SIZE);
//tilePane.setMinHeight(Control.USE_PREF_SIZE);
tilePane.getChildren().addAll(new Button("Test"), new Button("Test"), new Button("Test"), new Button("Long Text"));
//root.setMaxHeight(Control.USE_COMPUTED_SIZE);
root.getChildren().addAll(tilePane);
Scene scene = new Scene(VBoxBuilder.create().children(root, new Button("NEU")).build());
stage.setScene(scene);
stage.show();
}
}
setMaxHeight() and so on, does not have any effect.
This is related to
Sample:
import javafx.application.Application;
import javafx.geometry.Orientation;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.layout.HBox;
import javafx.scene.layout.TilePane;
import javafx.scene.layout.VBoxBuilder;
import javafx.stage.Stage;
public class TestApp4 extends Application {
public static void main(String[] args) {
launch(args);
}
@Override
public void start(final Stage stage) throws Exception {
HBox root = new HBox();
TilePane tilePane = new TilePane();
tilePane.setStyle("-fx-border-color:red");
tilePane.setOrientation(Orientation.HORIZONTAL);
tilePane.setPrefColumns(5);
//tilePane.setMaxHeight(Control.USE_PREF_SIZE);
//tilePane.setMinHeight(Control.USE_PREF_SIZE);
tilePane.getChildren().addAll(new Button("Test"), new Button("Test"), new Button("Test"), new Button("Long Text"));
//root.setMaxHeight(Control.USE_COMPUTED_SIZE);
root.getChildren().addAll(tilePane);
Scene scene = new Scene(VBoxBuilder.create().children(root, new Button("NEU")).build());
stage.setScene(scene);
stage.show();
}
}