Skip to content

Commit 097c017

Browse files
GopaloraAndy Goryachev
authored andcommitted
8245602: Ensemble8: HTMLEditor Toolbar gets scrolled out of view
Reviewed-by: angorya
1 parent 4a4272b commit 097c017

File tree

1 file changed

+4
-7
lines changed
  • apps/samples/Ensemble8/src/samples/java/ensemble/samples/controls/htmleditor

1 file changed

+4
-7
lines changed

apps/samples/Ensemble8/src/samples/java/ensemble/samples/controls/htmleditor/HTMLEditorApp.java

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -76,12 +76,9 @@ public Parent createContent() {
7676
htmlEditor = new HTMLEditor();
7777
htmlEditor.setHtmlText(INITIAL_TEXT);
7878

79-
ScrollPane htmlSP = new ScrollPane();
80-
htmlSP.setFitToWidth(true);
81-
htmlSP.setPrefWidth(htmlEditor.prefWidth(-1)); // Workaround of JDK-8096877
82-
htmlSP.setPrefHeight(245);
83-
htmlSP.setVbarPolicy(ScrollBarPolicy.NEVER);
84-
htmlSP.setContent(htmlEditor);
79+
VBox htmlVB = new VBox();
80+
htmlVB.setPrefHeight(245);
81+
htmlVB.getChildren().add(htmlEditor);
8582

8683
final Label htmlLabel = new Label();
8784
htmlLabel.setWrapText(true);
@@ -99,7 +96,7 @@ public Parent createContent() {
9996
VBox vRoot = new VBox();
10097
vRoot.setAlignment(Pos.CENTER);
10198
vRoot.setSpacing(5);
102-
vRoot.getChildren().addAll(htmlSP, showHTMLButton, scrollPane);
99+
vRoot.getChildren().addAll(htmlVB, showHTMLButton, scrollPane);
103100

104101
return vRoot;
105102
}

0 commit comments

Comments
 (0)