java JavaFx - SceneBuilder 中的 Tab 键顺序
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/30676720/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
JavaFx - tab order in SceneBuilder
提问by
How can I set tab order (focus order) for elements, for example text field in SceneBuilder?
如何为元素设置 Tab 键顺序(焦点顺序),例如 SceneBuilder 中的文本字段?
回答by
The answer: In SB on the Hierarchy panel it's necessary to set such order of nodes which you need for tab order.
答案:在层次结构面板上的 SB 中,有必要设置 Tab 键顺序所需的节点顺序。
回答by Thorsten
I found a workaround, open the fxml file with a text editor or an xml editor and bring the input controls into the requested order. This helped in my case.
我找到了一个解决方法,用文本编辑器或 xml 编辑器打开 fxml 文件,并将输入控件按要求的顺序排列。这对我有帮助。
回答by Jamith
You can do this easily with SceneBuilder. Open fxml file with scenebuilder and got to hierarchyunder Documenttab. Place input controls into a order you want by dragging input controls. Then focus traversal policy will work nicely when you press tab.
您可以使用SceneBuilder轻松完成此操作。使用场景构建器打开 fxml 文件并进入文档选项卡下的层次结构。通过拖动输入控件将输入控件放入您想要的顺序。然后,当您按 Tab 键时,焦点遍历策略会很好地工作。
回答by hashem yousefi
You can set tab order according to the components location in the parent panel in scene builder.
您可以根据场景构建器中父面板中的组件位置设置选项卡顺序。