SWT设置列高度或插入新行 [英] SWT Setting Column Height or insert new line

查看:122
本文介绍了SWT设置列高度或插入新行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前有一个表[org.eclipse.swt.widgets.Table]与几个TableColumns;然而,由于UI空间的限制,我有一个问题。



例如说我有一个名为目标用户的表列,这不可能命名其他任何东西,并且必须显示整个显示目标用户。现在让我说我还有几个其他表列有相同的问题。



我希望我可以添加一行或做某事来设置列的高度它可以是Target \\\
User,我可以保存一些宽度的方式。但是,在org.eclipse.swt.widgets.TableColumn.setText中似乎不起作用,也不是html。



任何想法?

解决方案

显然,这个( \\\
> TableColumn 的标签)仅适用于Linux而不是Windows。



请参阅 bug 97077 (2005!)


表/列的Linux / GTK实现可以轻松地进行多行插入 \\\
到文本中 - 应该在当前实现中工作。

Windows实现这将是非常棘手的。在Win32编程中,
的人可以替换表格控件或表头控件来获取此功能,也可以创建所有类型的技巧以完整的ListView32窗口以允许多行。



I currently have a Table [org.eclipse.swt.widgets.Table] with several TableColumns; however, due to UI space restrictions I have a bit of an issue.

Lets say for example I had a table column named "Target User" and this couldn't be named anything else AND the whole display "Target User" had to be displayed. Now lets say I also have several other Table Columns with the same problems.

I was hoping I could add a new line or do something to set the height of the column so it could be Target \n User and I could save some width that way. However, \n does not seem to work in org.eclipse.swt.widgets.TableColumn.setText , nor does html.

Any ideas?

解决方案

Apparently, this (the "\n" within a Label of a TableColumn) only works in Linux, not Windows.

See bug 97077 (2005!)

Linux/GTK implementation of table column can be easily made multiline inserting "\n" into text - should work in current implementations.
Windows implementation for this would be very tricky. In Win32 programming people either replace table control or table header control to get this functionality or create all kind of tricks to full ListView32 window to allow multiliner.

这篇关于SWT设置列高度或插入新行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆