Combobox clearing value issue

前端 未结 8 2599
逝去的感伤
逝去的感伤 2020-12-15 06:00

I\'ve stumbled on an issue with Comboboxes in javafx2.2. This is the scenario:

  • Users click on the \'editFile\' button.
  • Another pane becomes visible (w
8条回答
  •  忘掉有多难
    2020-12-15 06:31

    I had the same problem with a ComboBox. The buttonCell of the ComboBox is not updated correctly when I change the items of the ComboBox. This looks like a graphics bug.

    I use direct manipulation of buttonCell field in ComboBox.

    combo.getButtonCell().setText("");
    combo.getButtonCell().setItem(null);
    

    This is the best solution I've found without recreate the ComboBox.

提交回复
热议问题