SWT Set column height or insert new row

I currently have a table [org.eclipse.swt.widgets.Table] with several TableColumns; however due to UI space limitations I have a problem.

Suppose, for example, that I had a table column named “Target User”, and this could not be called anything else, and the entire “Target User” display should be displayed. Now let's say that I also have several other table columns with the same problems.

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

Any ideas?

+3
source share
1 answer

Apparently, this (" \n" inside a Labelof TableColumn) works only on Linux, not Windows.

See bug 97077 (2005!)

An implementation of a Linux / GTK table column can be easily made for multi-line insertion of " \n" in text - should work in current implementations.
Implementing Windows for this would be a very difficult task. In Win32 programming, people either replace the table management or the table title header to get this functionality or create all kinds of tricks in the full ListView32 window to enable multiliner.

+2
source

Source: https://habr.com/ru/post/1716522/


All Articles