MaterialFX
MaterialFX copied to clipboard
MFXComboBox visible rows
Discussed in https://github.com/palexdev/MaterialFX/discussions/242
Originally posted by Keiinmal August 30, 2022 Hey, I need to work with a MFXComboBox but appearently it always only shows 3 rows. Normally it would be possible to use "comboBox.setVisibleRowCount(int)" to change the amount but it looks like MFXComboBox does not extend the JavaFx ComboBox. Is there any way to still change the amount?
The height of the popup is set by the combo box css To change it you just have to add a stylesheet to the control or the root pane with this settings:
.mfx-combo-box .combo-popup .virtual-flow {
-fx-pref-height: prefVal;
-fx-max-height: maxVal;
}
Discussion made into issue as a reminder to improve this and add the visibleRowCount property