Hello, I will show you how to install this Metro skin in your projects.
It is a JavaFX css style that allows you to modify the controls, giving it a metro effect.
I use JMetro CSS files from:
Some Issues you have to know.
Thanks to @tchart
DEFAULT B4J:
METRO STYLE LIGHT:
METRO STYLE DARK:
STEP 1:
Download [B4J] - METRO STYLE attach ZIP and Unzip.
STEP 2:
Add a new group on Files tab.
Add all CSS file of the zip file.
You should have all these files added in the list.
STEP 3:
Now go to the modules tab, and right click on Main and click on Add Existing Module.
Select the .bas file on the zip.
Select "Copy to project folder" and click OK
You should have this code.
Now just use this code:
I hope it will be you useful.
Regards!
It is a JavaFX css style that allows you to modify the controls, giving it a metro effect.
I use JMetro CSS files from:
JFXtras/jfxtras-styles
Java, JavaFX themes or look and feels. Currently contains JMetro theme. - JFXtras/jfxtras-stylesgithub.com
Some Issues you have to know.
Thanks to @tchart
- There are some definitions for jfx controls that are specified under "sun.com.javafx..." these need to be relabelled to just "javafx..." (for open jdk).
- I had to comment out any definitions with "impl.jfxtras.styles."
- Some of the B4J controls dont seem to be defined (eg slider) so I had to remove those from the demo form
DEMO:
DEFAULT B4J:
METRO STYLE LIGHT:
METRO STYLE DARK:
STEP 1:
Download [B4J] - METRO STYLE attach ZIP and Unzip.
NOTE: The screenshot lang its spanish, but are the same options.
STEP 2:
Add a new group on Files tab.
Add all CSS file of the zip file.
You should have all these files added in the list.
STEP 3:
Now go to the modules tab, and right click on Main and click on Add Existing Module.
Select the .bas file on the zip.
Select "Copy to project folder" and click OK
You should have this code.
Now just use this code:
B4X:
' For the Light style
Metro.ApplyTheme(MainForm,"Light")
B4X:
' For the Dark style
Metro.ApplyTheme(MainForm,"Dark")
I hope it will be you useful.
Regards!
Attachments
Last edited: