Javafx combobox not updating dropdown size upon change on realtime?

前端 未结 5 549
一整个雨季
一整个雨季 2021-02-09 13:00

I am using Javafx v8.0.25-b18.

The problem I occur is that the size of the dynamic combox\'s dropdown list doesn\'t change, so if I had initially two items in the dropdo

5条回答
  •  别跟我提以往
    2021-02-09 13:30

    Try this:

    box.hide(); //before you set new visibleRowCount value
    box.setVisibleRowCount(rows); // set new visibleRowCount value
    box.show(); //after you set new visibleRowCount value
    

    It's works for me with editable comboBox and I think it will work in your case.

提交回复
热议问题