Java Reference
In-Depth Information
Ta b l e 5 . 2
TextBox CSS Attributes ( Continued )
CSS Attribute
JavaFX Attribute
Type
Default Value
border-fill
borderFill
paint
linear (0, 0) to (0, 4)
stops (0.0, #8d8e8f),
(0.75, #b3b3b),
(1.0, #b8b8b9);
background-fill
backgroundFill
paint
linear (0, 1) to (0, 4)
stops (0.0, #cbcbcc),
(0.66, #f8f8f8),
(1.0, white);
text-fill
textFill
paint
#0b1621;
selected-text-fill
selectedTextFill
paint
#0b1621;
font
font
font
12pt Dialog;
focus-fill
focusFill
paint
#73a4d1;
focus-size
focusSize
paint
1.4
caret-fill
caretFill
paint
black
caret-stroke
caretStroke
paint
black
highlight-fill
highlightFill
paint
null;
The pseudo classes :hover, :pressed, :disabled, and :focused are supported for the
TextBox control.
Listing 5.28 shows how to create a TextBox .
Listing 5.28
javafx.scene.control.TextBox
Stage {
title: "Text Box Example"
scene: Scene {
width: 200
height: 200
content: [
TextBox {
translateX: 50
translateY: 50
text: "Change Me"
columns: 12
Search WWH ::




Custom Search