B4J Code Snippet Metro Style with JMetro

Similar threads

B4J Code Snippet [JavaFX] - Metro Style CSS
B4J Code Snippet Google Map with custom style
B4A Code Snippet [B4X] Use WebView to show large images
B4J Code Snippet Redirect the output to a file
B4J Library [BMStyle] CSS Themes

Erel

Administrator
Staff member
Licensed User
1. Download jmetro-4.0.jar and copy it to the additional libraries folder.
https://github.com/JFXtras/jfxtras-styles/releases

2. Add reference to the jar:
B4X:
#AdditionalJar: jmetro-4.0
3. Apply the theme:
B4X:
Dim jo As JavaObject
jo.InitializeNewInstance("jfxtras.styles.jmetro8.JMetro", Array("LIGHT")) 'or DARK
Dim jform As JavaObject = MainForm
jo.RunMethod("applyTheme", Array(jform.GetField("scene")))
Before



After



Make sure to test it carefully as the theme changes some of the style attributes that are set by the designer.
 

ivanomonti

Well-Known Member
Licensed User
I'm trying version 11.6.9 and it gives me error in the string applyTheme as method not found, I was wondering if this updated version you could use.
 
Top