### Slider CSS Styling

Options to change the style of the sliders in an application.
Create external CSS file
Create a file e.g. main.css with content see below.
Store the file in the project files folder (dirassets).
Add the file main.css to the B4J IDE Files Manager.
Assign the file main.css to the form pane, like
`Private Sub Class_Globals
Private MainForm As Form
...
MainForm.Stylesheets.Add(File.GetUri(File.DirAssets, "Main.css"))
Or for a modal or non-modal form
`Private Sub Class_Globals
Private frm As Form
...
frm.Stylesheets.Add(File.GetUri(File.DirAssets, "Main.css"))
Content of the external css file
// Slider
// Set the color of the tick label
.slider .axis {
-fx-tick-label-fill: gray;
}
// Set the color of the tick marks
.slider .axis {
-fx-tick-mark-fill: gray;
}
// Set the color of the minor tick marks
.slider .axis {
-fx-tick-mark-fill: lightgray;
}
// Set the thumb
.slider .thumb {
-fx-background-color: rgb(60,60,60);
-fx-border-radius: 10;
-fx-border-color: darkgray;
}
// Color the track
.slider .track {
-fx-background-color: rgb(20,20,20);
}
// Change thumb icon.
// The example select.png must be located in the files folder and added to the B4J IDE Files Manager
.slider .thumb {
-fx-background-color: rgb(0,0,255);
-fx-border-radius: 0;
-fx-border-color: darkgray;
-fx-background-image :url("select.png");
-fx-padding: 12;
}
``

Changed: , Category: Slider, File: T6C249M1804.htm, ID: 1804