Chromos
Chromos

Reputation: 1921

JavaFx ListView EventHandler when pressing enter?

Is there a way to add an eventhandler to a ListView on pressing enter, like setOnAction for a TextField?

Upvotes: 0

Views: 1025

Answers (1)

tomsontom
tomsontom

Reputation: 5897

You need to add an setOnKeyPressed() and filter for the "return" key

Upvotes: 1

Related Questions