-
Bug
-
Resolution: Fixed
-
P2
-
fx1.1.1
-
WinXP SP2 + JDK 1.6.0_11
Had to change "spacing" property to a new value then back to old value on VBox to refresh the view when updating the height of a single node within that VBox.
Below codes can be used to re-produce the problem
import javafx.stage.Stage;
import javafx.scene.Scene;
import javafx.scene.shape.Rectangle;
import javafx.scene.paint.Color;
import javafx.scene.layout.VBox;
import javafx.scene.input.MouseEvent;
var vBox: VBox;
var vRect1: Rectangle;
var vRect2: Rectangle;
Stage {
title: "VBox"
width: 600
height: 600
visible: true
scene: Scene{
content: [
vBox = VBox {
spacing: 10
content: [
vRect1 = Rectangle {
x: 10
y: 10
width:200
height:25
stroke: Color.BLACK
fill: Color.GREEN
}//Rectangle
vRect2 = Rectangle {
x: 10
y: 10
width:200
height:25
stroke: Color.BLACK
fill: Color.BLUE
}//Rectangle
]
onMousePressed: function(e: MouseEvent) {
vRect1.height++;
// vBox.spacing++; // The workaround is to uncomment this line, and
// vBox.spacing--; // this line
}
}
]
} //Scene
}//Stage
Below codes can be used to re-produce the problem
import javafx.stage.Stage;
import javafx.scene.Scene;
import javafx.scene.shape.Rectangle;
import javafx.scene.paint.Color;
import javafx.scene.layout.VBox;
import javafx.scene.input.MouseEvent;
var vBox: VBox;
var vRect1: Rectangle;
var vRect2: Rectangle;
Stage {
title: "VBox"
width: 600
height: 600
visible: true
scene: Scene{
content: [
vBox = VBox {
spacing: 10
content: [
vRect1 = Rectangle {
x: 10
y: 10
width:200
height:25
stroke: Color.BLACK
fill: Color.GREEN
}//Rectangle
vRect2 = Rectangle {
x: 10
y: 10
width:200
height:25
stroke: Color.BLACK
fill: Color.BLUE
}//Rectangle
]
onMousePressed: function(e: MouseEvent) {
vRect1.height++;
// vBox.spacing++; // The workaround is to uncomment this line, and
// vBox.spacing--; // this line
}
}
]
} //Scene
}//Stage