wood burning stoves 2.0
The moose likes JavaFX and the fly likes HBox, ChoiceBox and tab-order weirdness Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of OCA Java SE 8 Programmer I Study Guide 1Z0-808 this week in the OCAJP forum!
JavaRanch » Java Forums » Java » JavaFX
Bookmark "HBox, ChoiceBox and tab-order weirdness" Watch "HBox, ChoiceBox and tab-order weirdness" New topic

HBox, ChoiceBox and tab-order weirdness

iain coghill

Joined: Apr 19, 2009
Posts: 11
Some unexpected tab-order oddities have cropped up when I use javafx.scene.control.ChoiceBox within an HBox.

Try the following:

What tab-order would you expect? I expected the first TextBox to have initial focus and on pressing <TAB> to cycle through the ChoiceBox then last two TextBox controls in order. What I get is rather different. The ChoiceBox gets initial focus and pressing <TAB> jumps back to first TextBox, then forward to the last two TextBoxs in order. Adding more ChoiceBox controls just adds to the weirdness, it seems ChoiceBox gets first preference in tab-order within the HBox, regardless of actual order. Replace HBox with VBox in the above code and things work in the manner you would expect

Anybody else experienced similar? Any way to manually assign tab-order or otherwise sidestep the issue?
I agree. Here's the link: http://aspose.com/file-tools
subject: HBox, ChoiceBox and tab-order weirdness