[英]How to implement a column headers spanning feature of TreeTableView control?
This feature (nested columns) is documented in the Oracle JavaFX controls tutorials for TableView . TableView的Oracle JavaFX控件教程中记录了此功能(嵌套列)。
For example, suppose that the contacts in the address book have two email accounts.
例如,假设通讯录中的联系人有两个电子邮件帐户。 Then you need two columns to show the primary and the secondary email addresses.
然后,您需要两列来显示主要和辅助电子邮件地址。 Create two subcolumns, and call the getColumns method on emailCol.
创建两个子列,然后在emailCol上调用getColumns方法。
TableColumn firstEmailCol = new TableColumn("Primary"); TableColumn secondEmailCol = new TableColumn("Secondary"); emailCol.getColumns().addAll(firstEmailCol, secondEmailCol);
Read the nested columns javadoc ( TableColumnBase.getColumns ) for more information. 阅读嵌套列javadoc( TableColumnBase.getColumns ),以获取更多信息。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.