When a control which is labeled is used as clip, the text appears displaced. Text appears at the top relative to the 'box' which represents the control.
To reproduce, run the below test. A CheckBox is used as clip.It could be seen that text is at the top relative to the CheckBox's box
import javafx.scene.*;
import javafx.stage.*;
import javafx.scene.shape.*;
import javafx.scene.control.*;
Stage {
scene: Scene {
content: [Rectangle {
width: 200
height: 200
clip: CheckBox {
text: "CheckBox"
translateX: 30
translateY: 30
}
/*}, CheckBox {
text: "CheckBox"
translateX: 30
translateY: 30*/
}]
}
}
To reproduce, run the below test. A CheckBox is used as clip.It could be seen that text is at the top relative to the CheckBox's box
import javafx.scene.*;
import javafx.stage.*;
import javafx.scene.shape.*;
import javafx.scene.control.*;
Stage {
scene: Scene {
content: [Rectangle {
width: 200
height: 200
clip: CheckBox {
text: "CheckBox"
translateX: 30
translateY: 30
}
/*}, CheckBox {
text: "CheckBox"
translateX: 30
translateY: 30*/
}]
}
}