简体   繁体   English

如何在Eclipse RCP中使用SWT在表网格中对列标题进行分组

[英]How to group columns header in Table Grid with SWT, in Eclipse RCP

I have a Table widget in a view, and I'm adding columns. 我在视图中有一个表格小部件,并且正在添加列。 But I need to group headers. 但是我需要对标题进行分组。 I want to have one title, for several columns. 我想要一个标题,用于多列。

I search a solution on web, but uses method that SWT seems to not have. 我在网上搜索解决方案,但是使用了SWT似乎没有的方法。

TableColumnModel cm = table.getColumnModel();

This is my table declaration: 这是我的表声明:

table = new Table(content, SWT.BORDER | SWT.FULL_SELECTION | SWT.V_SCROLL | SWT.FILL);

Any suggestions? 有什么建议么?

The method you're asking about is for Swing JTable , not SWT's Table or JFace's TableViewer . 您要问的方法是针对Swing JTable ,而不是SWT的Table或JFace的TableViewer You might find an example for doing what you want in the SWT Snippets page . 您可以在SWT代码段页面中找到执行所需操作的示例。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM