The CSSUtils code module makes it easier to update CSS properties at runtime.
Methods:
- SetBackgroundColor
- SetBackgroundImage
- SetBorder
- ColorToHex (this is a helper method for other methods that work with colors)
- SetStyleProperty
- GetStyleProperty
Add CSSUtils to your project with Project - Add Existing Module.
The CSS properties are documented here: https://docs.oracle.com/cd/E17802_01/javafx/javafx/1.3/docs/api/javafx.scene/doc-files/cssref.html
Starting from B4J v4.20, CSSUtils is included as a library.
Methods:
- SetBackgroundColor
- SetBackgroundImage
- SetBorder
- ColorToHex (this is a helper method for other methods that work with colors)
- SetStyleProperty
- GetStyleProperty
B4X:
CSSUtils.SetBackgroundColor(Pane1, fx.Colors.Yellow)
CSSUtils.SetStyleProperty(Pane1, "-fx-rotate", "45")
Add CSSUtils to your project with Project - Add Existing Module.
The CSS properties are documented here: https://docs.oracle.com/cd/E17802_01/javafx/javafx/1.3/docs/api/javafx.scene/doc-files/cssref.html
Starting from B4J v4.20, CSSUtils is included as a library.
Attachments
Last edited: