### Set Item Font Size

Create an external Stylesheet (CSS file) in the Project DirAssets folder, like main.css.
Example
Stylesheet main.css
/*Set the font size and font of the listview cell */
.list-cell
{
-fx-font: 10pt "Arial";
}
B4J code snipped adding the stylesheet
'Ensure to add the file main.css, stored in files folder, to the B4J IDE Files Manager
MainForm.Stylesheets.Add(File.GetUri(File.DirAssets, "main.css"))
B4J Full Code Example
`Sub Process_Globals
Private fx As JFX
Private MainForm As Form
Private lv As ListView
End Sub`
`Sub AppStart (Form1 As Form, Args() As String)
MainForm = Form1
MainForm.Show
lv.Initialize("lv")
For i = 1 To 100
lv.Items.Add(i)
Next
lv.SelectedIndex = 0
MainForm.Stylesheets.Add(File.GetUri(File.DirAssets, "main.css"))
MainForm.RootPane.AddNode(lv, 0, 0, -1, -1)
End Sub`

Changed: , Category: ListView, File: T6C216M1592.htm, ID: 1592