### Set Item Height

To set the item height of an item (=row), make use of an external stylesheet which is stored in the files folder.
Another way, could be via JavaFX ListView API method (not used here)
Example
Stylesheet main.css
/*Set the height of a listview cell */
.list-cell {
-fx-cell-size: 50px ;
}
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: T6C216M1593.htm, ID: 1593