JavaFx 2.0 与 FXML:选项卡位于底部而不是顶部?
是否可以定义 TabBar 将选项卡放置在底部而不是顶部?
Is it possible to define the TabBar to place the tabs at bottom instead of top?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
要设置选项卡的侧面,请使用以下代码片段:
现在内容位于选项卡上方。
也是完整的 FXML 示例:
主类:
和控制器:
正如您在示例中看到的,fxml 是 Java 类的 xml 表示形式。如果该类具有属性端(getSide、setSide),则该类在 fxml 中具有属性端。因此,您可以阅读 api 文档来了解 fxml 中也提供了哪些属性。
希望这有帮助。
To set the side of the tabs use following snippet:
Now the content is above the tabs.
Also as full FXML example:
The main class:
And the controller:
as you can see in the example, fxml is an xml representation of the Java classes. If the class has an property side (getSide, setSide) then the class has in fxml an attribute side. So you can read the api documentation to find out which attributes are available in fxml as well.
Hope this helps.
不要定义
TabBar
!使用正确的布局窗格,例如javafx.scene.layout.BorderPane
。查找 JavaFX 2.0 API 和 FXML 的附加示例:
JAVAFX 2.0 API
有关详细信息,请查看 http://download.oracle.com/javafx/2.0/layout/jfxpub-layout.htm
FXML
示例.fxml:
Don't define the
TabBar
! Use a proper layout pane e.g.javafx.scene.layout.BorderPane
.Find attached examples for JavaFX 2.0 API and FXML:
JAVAFX 2.0 API
For further information have a look at http://download.oracle.com/javafx/2.0/layout/jfxpub-layout.htm
FXML
Sample.fxml: