JavaFX 2 TableView 直接在控件上插入行
JavaFX 2 中的 TableView 控件是否允许在控件的单元格上插入新数据?
我在那个方向找不到任何东西。甚至 Oracle 示例在控件之外也有单独的文本框和 ADD 按钮(就像 90 年代初一样 - 是的,我已经编程了那么久......)
Does the TableView Control in JavaFX 2 allow the insertion of new data right on the cells of the control?
I have not been able to find anything in that direction. Even the Oracle sample has separate textboxes and an ADD button outside of the control (like it was in the early 90's - yea, I've been programming for that long...)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
目前尚不清楚您想要实现什么目标。
如果您的意思是就地编辑表值,您可以查看本教程: http://docs.oracle.com/javafx/2.0/ui_controls/table-view.htm
如果您想通过单元格上的操作添加新行,您可以通过以下方式向单元格添加上下文菜单
TableView.setContextMenu(context_menu);
并实现“在单元格右侧”添加新行。It's not really clear what do you want to achieve.
If you mean editing table values in place you can take a look at this tutorial: http://docs.oracle.com/javafx/2.0/ui_controls/table-view.htm
If you want to add new row by action on cell you can add context menu to cells by
TableView.setContextMenu(context_menu);
and implement adding new row "right on the cells".