This works
This does not
here is a portion of the error messages - it repeats.
I really would like to be able to set a gradient on (or behind?) TextArea. It is communicating information - progress bar.
I would prefer to do it without additional nodes. In the end there might be 100 or more of these and adding additional nodes just complicates the code and slows down performance.
Thanks for your help
Update:
I also tried
which fails with
B4X:
TA.Style = ";-fx-base:red" ' { box-shadow: 0 20px 50px rgba(59, 43, 91, 0.7); }"
This does not
B4X:
TA.Style = ";-fx-base:linear-gradient(from 10% 10% To 80% 80%, red 0%, black 100%)"
here is a portion of the error messages - it repeats.
B4X:
Jan 30, 2020 5:42:36 PM javafx.scene.CssStyleHelper calculateValue
WARNING: Caught 'java.lang.ClassCastException: javafx.scene.paint.LinearGradient cannot be cast to javafx.scene.paint.Color' while converting value for '-fx-background-color' from rule '*.text-input:focused' in stylesheet jar:file:/D:/AndroidX/Java/jdk1.8.0_131/jre/lib/ext/jfxrt.jar!/com/sun/javafx/scene/control/skin/modena/modena.bss
Jan 30, 2020 5:42:36 PM javafx.scene.CssStyleHelper calculateValue
WARNING: Caught 'java.lang.ClassCastException: javafx.scene.paint.LinearGradient cannot be cast to javafx.scene.paint.Color' while converting value for '-fx-text-fill' from rule '*.text-input' in stylesheet jar:file:/D:/AndroidX/Java/jdk1.8.0_131/jre/lib/ext/jfxrt.jar!/com/sun/javafx/scene/control/skin/modena/modena.bss
Jan 30, 2020 5:42:36 PM javafx.scene.CssStyleHelper calculateValue
WARNING: Caught 'java.lang.ClassCastException: javafx.scene.paint.LinearGradient cannot be cast to javafx.scene.paint.Color' while converting value for '-fx-background-color' from rule '*.text-area:focused *.content' in stylesheet jar:file:/D:/AndroidX/Java/jdk1.8.0_131/jre/lib/ext/jfxrt.jar!/com/sun/javafx/scene/control/skin/modena/modena.bss
Jan 30, 2020 5:42:36 PM javafx.scene.CssStyleHelper calculateValue
WARNING: Caught 'java.lang.ClassCastException: javafx.scene.paint.LinearGradient cannot be cast to javafx.scene.paint.Color' while converting value for '-fx-background-color' from rule '*.scroll-bar:vertical' in stylesheet jar:file:/D:/AndroidX/Java/jdk1.8.0_131/jre/lib/ext/jfxrt.jar!/com/sun/javafx/scene/control/skin/modena/modena.bss
Jan 30, 2020 5:42:36 PM javafx.scene.CssStyleHelper calculateValue
WARNING: Caught 'java.lang.ClassCastException: javafx.scene.paint.LinearGradient cannot be cast to javafx.scene.paint.Color' while converting value for '-fx-background-color' from rule '*.scroll-bar>*.increment-button>*.increment-arrow' in stylesheet jar:file:/D:/AndroidX/Java/jdk1.8.0_131/jre/lib/ext/jfxrt.jar!/com/sun/javafx/scene/control/skin/modena/modena.bss
Jan 30, 2020 5:42:36 PM javafx.scene.CssStyleHelper calculateValue
WARNING: Caught 'java.lang.ClassCastException: javafx.scene.paint.LinearGradient cannot be cast to javafx.scene.paint.Color' while converting value for '-fx-background-color' from rule '*.scroll-bar>*.decrement-button>*.decrement-arrow' in stylesheet jar:file:/D:/AndroidX/Java/jdk1.8.0_131/jre/lib/ext/jfxrt.jar!/com/sun/javafx/scene/control/skin/modena/modena.bss
Jan 30, 2020 5:42:36 PM javafx.scene.CssStyleHelper calculateValue
WARNING: Caught 'java.lang.ClassCastException: javafx.scene.paint.LinearGradient cannot be cast to javafx.scene.paint.Color' while converting value for '-fx-background-color' from rule '*.scroll-bar:vertical>*.thumb' in stylesheet jar:file:/D:/AndroidX/Java/jdk1.8.0_131/jre/lib/ext/jfxrt.jar!/com/sun/javafx/scene/control/skin/modena/modena.bss
Jan 30, 2020 5:42:36 PM javafx.scene.CssStyleHelper calculateValue
WARNING: Caught 'java.lang.ClassCastException: javafx.scene.paint.LinearGradient cannot be cast to javafx.scene.paint.Color' while converting value for '-fx-background-color' from rule '*.scroll-bar:horizontal' in stylesheet jar:file:/D:/AndroidX/Java/jdk1.8.0_131/jre/lib/ext/jfxrt.jar!/com/sun/javafx/scene/control/skin/modena/modena.bss
Jan 30, 2020 5:42:36 PM javafx.scene.CssStyleHelper calculateValue
WARNING: Caught 'java.lang.ClassCastException: javafx.scene.paint.LinearGradient cannot be cast to javafx.scene.paint.Color' while converting value for '-fx-background-color' from rule '*.scroll-bar>*.increment-button>*.increment-arrow' in stylesheet jar:file:/D:/AndroidX/Java/jdk1.8.0_131/jre/lib/ext/jfxrt.jar!/com/sun/javafx/scene/control/skin/modena/modena.bss
Jan 30, 2020 5:42:36 PM javafx.scene.CssStyleHelper calculateValue
WARNING: Caught 'java.lang.ClassCastException: javafx.scene.paint.LinearGradient cannot be cast to javafx.scene.paint.Color' while converting value for '-fx-background-color' from rule '*.scroll-bar>*.decrement-button>*.decrement-arrow' in stylesheet jar:file:/D:/AndroidX/Java/jdk1.8.0_131/jre/lib/ext/jfxrt.jar!/com/sun/javafx/scene/control/skin/modena/modena.bss
Jan 30, 2020 5:42:36 PM javafx.scene.CssStyleHelper calculateValue
WARNING: Caught 'java.lang.ClassCastException: javafx.scene.paint.LinearGradient cannot be cast to javafx.scene.paint.Color' while converting value for '-fx-background-color' from rule '*.scroll-bar>*.thumb' in stylesheet jar:file:/D:/AndroidX/Java/jdk1.8.0_131/jre/lib/ext/jfxrt.jar!/com/sun/javafx/scene/control/skin/modena/modena.bss
Jan 30, 2020 5:42:36 PM javafx.scene.CssStyleHelper calculateValue
WARNING: Caught 'java.lang.ClassCastException: javafx.scene.paint.LinearGradient cannot be cast to javafx.scene.paint.Color' while converting value for '-fx-background-color' from rule '*.scroll-pane>*.corner' in stylesheet jar:file:/D:/AndroidX/Java/jdk1.8.0_131/jre/lib/ext/jfxrt.jar!/com/sun/javafx/scene/control/skin/modena/modena.bss
Jan 30, 2020 5:42:39 PM javafx.scene.CssStyleHelper calculateValue
WARNING: Caught 'java.lang.ClassCastException: javafx.scene.paint.LinearGradient cannot be cast to javafx.scene.paint.Color' while converting value for '-fx-highlight-fill' from rule '*.text-input' in stylesheet jar:file:/D:/AndroidX/Java/jdk1.8.0_131/jre/lib/ext/jfxrt.jar!/com/sun/javafx/scene/control/skin/modena/modena.bss
Jan 30, 2020 5:42:39 PM javafx.scene.CssStyleHelper calculateValue
WARNING: Caught 'java.lang.ClassCastException: javafx.scene.paint.LinearGradient cannot be cast to javafx.scene.paint.Color' while converting value for '-fx-text-fill' from rule '*.text-input' in stylesheet jar:file:/D:/AndroidX/Java/jdk1.8.0_131/jre/lib/ext/jfxrt.jar!/com/sun/javafx/scene/control/skin/modena/modena.bss
Jan 30, 2020 5:42:39 PM javafx.scene.CssStyleHelper calculateValue
WARNING: Caught 'java.lang.ClassCastException: javafx.scene.paint.LinearGradient cannot be cast to javafx.scene.paint.Color' while converting value for '-fx-highlight-text-fill' from rule '*.text-input' in stylesheet jar:file:/D:/AndroidX/Java/jdk1.8.0_131/jre/lib/ext/jfxrt.jar!/com/sun/javafx/scene/control/skin/modena/modena.bss
Jan 30, 2020 5:42:39 PM javafx.scene.CssStyleHelper calculateValue
WARNING: Caught 'java.lang.ClassCastException: javafx.scene.paint.LinearGradient cannot be cast to javafx.scene.paint.Color' while converting value for '-fx-background-color' from rule '*.text-area' in stylesheet jar:file:/D:/AndroidX/Java/jdk1.8.0_131/jre/lib/ext/jfxrt.jar!/com/sun/javafx/scene/control/skin/modena/modena.bss
Jan 30, 2020 5:42:39 PM javafx.scene.CssStyleHelper calculateValue
WARNING: Caught 'java.lang.ClassCastException: javafx.scene.paint.LinearGradient cannot be cast to javafx.scene.paint.Color' while converting value for '-fx-prompt-text-fill' from rule '*.text-input' in stylesheet jar:file:/D:/AndroidX/Java/jdk1.8.0_131/jre/lib/ext/jfxrt.jar!/com/sun/javafx/scene/control/skin/modena/modena.bss
Jan 30, 2020 5:42:39 PM javafx.scene.CssStyleHelper calculateValue
WARNING: Caught 'java.lang.ClassCastException: javafx.scene.paint.LinearGradient cannot be cast to javafx.scene.paint.Color' while converting value for '-fx-background-color' from rule '*.text-area *.content' in stylesheet jar:file:/D:/AndroidX/Java/jdk1.8.0_131/jre/lib/ext/jfxrt.jar!/com/sun/javafx/scene/control/skin/modena/modena.bss
Jan 30, 2020 5:42:39 PM javafx.scene.CssStyleHelper calculateValue
WARNING: Caught 'java.lang.ClassCastException: javafx.scene.paint.LinearGradient cannot be cast to javafx.scene.paint.Color' while converting value for '-fx-background-color' from rule '*.scroll-bar:vertical' in stylesheet jar:file:/D:/AndroidX/Java/jdk1.8.0_131/jre/lib/ext/jfxrt.jar!/com/sun/javafx/scene/control/skin/modena/modena.bss
Jan 30, 2020 5:42:39 PM javafx.scene.CssStyleHelper calculateValue
WARNING: Caught 'java.lang.ClassCastException: javafx.scene.paint.LinearGradient cannot be cast to javafx.scene.paint.Color' while converting value for '-fx-background-color' from rule '*.scroll-bar>*.increment-button>*.increment-arrow' in stylesheet jar:file:/D:/AndroidX/Java/jdk1.8.0_131/jre/lib/ext/jfxrt.jar!/com/sun/javafx/scene/control/skin/modena/modena.bss
I would prefer to do it without additional nodes. In the end there might be 100 or more of these and adding additional nodes just complicates the code and slows down performance.
Thanks for your help
Update:
I also tried
B4X:
TA.Style = ";-fx-control-inner-background: linear-gradient(To bottom right, red, black)"
B4X:
Jan 30, 2020 6:03:41 PM javafx.scene.CssStyleHelper calculateValue
WARNING: Caught 'java.lang.ClassCastException: javafx.scene.paint.LinearGradient cannot be cast to javafx.scene.paint.Color' while converting value for '-fx-background-color' from rule '*.text-input:focused' in stylesheet jar:file:/D:/AndroidX/Java/jdk1.8.0_131/jre/lib/ext/jfxrt.jar!/com/sun/javafx/scene/control/skin/modena/modena.bss
Jan 30, 2020 6:03:41 PM javafx.scene.CssStyleHelper calculateValue
WARNING: Caught 'java.lang.ClassCastException: javafx.scene.paint.LinearGradient cannot be cast to javafx.scene.paint.Color' while converting value for '-fx-text-fill' from rule '*.text-input' in stylesheet jar:file:/D:/AndroidX/Java/jdk1.8.0_131/jre/lib/ext/jfxrt.jar!/com/sun/javafx/scene/control/skin/modena/modena.bss
Jan 30, 2020 6:03:41 PM javafx.scene.CssStyleHelper calculateValue
WARNING: Caught 'java.lang.ClassCastException: javafx.scene.paint.LinearGradient cannot be cast to javafx.scene.paint.Color' while converting value for '-fx-background-color' from rule '*.text-area:focused *.content' in stylesheet jar:file:/D:/AndroidX/Java/jdk1.8.0_131/jre/lib/ext/jfxrt.jar!/com/sun/javafx/scene/control/skin/modena/modena.bss
Jan 30, 2020 6:03:45 PM javafx.scene.CssStyleHelper calculateValue
WARNING: Caught 'java.lang.ClassCastException: javafx.scene.paint.LinearGradient cannot be cast to javafx.scene.paint.Color' while converting value for '-fx-highlight-fill' from rule '*.text-input' in stylesheet jar:file:/D:/AndroidX/Java/jdk1.8.0_131/jre/lib/ext/jfxrt.jar!/com/sun/javafx/scene/control/skin/modena/modena.bss
Jan 30, 2020 6:03:45 PM javafx.scene.CssStyleHelper calculateValue
WARNING: Caught 'java.lang.ClassCastException: javafx.scene.paint.LinearGradient cannot be cast to javafx.scene.paint.Color' while converting value for '-fx-text-fill' from rule '*.text-input' in stylesheet jar:file:/D:/AndroidX/Java/jdk1.8.0_131/jre/lib/ext/jfxrt.jar!/com/sun/javafx/scene/control/skin/modena/modena.bss
Jan 30, 2020 6:03:45 PM javafx.scene.CssStyleHelper calculateValue
WARNING: Caught 'java.lang.ClassCastException: javafx.scene.paint.LinearGradient cannot be cast to javafx.scene.paint.Color' while converting value for '-fx-highlight-text-fill' from rule '*.text-input' in stylesheet jar:file:/D:/AndroidX/Java/jdk1.8.0_131/jre/lib/ext/jfxrt.jar!/com/sun/javafx/scene/control/skin/modena/modena.bss
Jan 30, 2020 6:03:45 PM javafx.scene.CssStyleHelper calculateValue
WARNING: Caught 'java.lang.ClassCastException: javafx.scene.paint.LinearGradient cannot be cast to javafx.scene.paint.Color' while converting value for '-fx-prompt-text-fill' from rule '*.text-input' in stylesheet jar:file:/D:/AndroidX/Java/jdk1.8.0_131/jre/lib/ext/jfxrt.jar!/com/sun/javafx/scene/control/skin/modena/modena.bss
Jan 30, 2020 6:03:45 PM javafx.scene.CssStyleHelper calculateValue
WARNING: Caught 'java.lang.ClassCastException: javafx.scene.paint.LinearGradient cannot be cast to javafx.scene.paint.Color' while converting value for '-fx-background-color' from rule '*.text-area *.content' in stylesheet jar:file:/D:/AndroidX/Java/jdk1.8.0_131/jre/lib/ext/jfxrt.jar!/com/sun/javafx/scene/control/skin/modena/modena.bss
Last edited: