Rotating TextField
Script
rotatingfield.fx
import javafx.scene.Scene;
import javafx.scene.control.Slider;
import javafx.scene.control.TextBox;
import javafx.scene.text.Font;
import javafx.stage.Stage;
var sliderValue: Number = 0;
Stage {
title: "Rotating Field"
scene: Scene {
width: 300
height: 250
content: [
Slider {
layoutX: 20
layoutY: 15
width: 260
min: -180
max: 180
value: bind sliderValue with inverse
vertical: false
},
TextBox {
layoutX: 50
layoutY: 120
width: 200
height: 50
// rotate the textfield coressponding to the slider value.
rotate: bind sliderValue
columns: 10
font: Font {
size: 24
}
text: "TextField"
editable: true
}
]
}
}