Reputation: 1253
Does anyone know how to expand a ComboBox
by code? I know that in C#
we can do this by comboBox1.DroppedDown = true;
, but how do I do this in JavaFX
?
Upvotes: 5
Views: 3311
Reputation: 36742
After your stage is visible, simply use :
comboBox.show();
If you want to add a event, before the stage is visible, you may use :
primaryStage.setOnShown(event -> comboBox.show());
Upvotes: 9