私は、各行のエントリから値を選択できるコンボセルを持つテーブルを持っています。問題は、ドロップダウンリストはセルの編集時のみを表示し、常にすべての行に表示することです。これは可能ですか?あれば、どうですか?すべてのセルでJava FX ComboBoxTableCellを表示
TableColumn<Product, String> actionsCol = new TableColumn<Product, String>("Exception Reason");
actionsCol.setCellValueFactory(new PropertyValueFactory("exceptionReason"));
actionsCol.setCellFactory(ComboBoxTableCell.forTableColumn(exceptionReasons));
actionsCol.setOnEditCommit(
new EventHandler<CellEditEvent<Product, String>>() {
@Override
public void handle(CellEditEvent<Product, String> t) {
((Product) t.getTableView().getItems().get(t.getTablePosition().getRow())).setExceptionReason(t.getNewValue());
};
});
actionsCol.setEditable(true);
あなたはこれを生成し、あなたのコードをポストする必要があります結果はここにあります。 – ManoDestra
@ManoDestra - 質問が列コード – Ashley