|How to align text in a TreeViewer cell [message #1754710]
||Tue, 21 February 2017 17:28
| Frank Gruendel
Registered: January 2014
by now I have spent the better part of two hours in the world wide WEB in vain. All I want to do is to change the vertical alignment of the text in a Treeviewer. As you can see in the image, the text is top-aligned whereas it should be center-aligned.
I am using Eclipse Mars.1 Release (4.5.1) with RAP 3.0.2 as the target platform.
As can be seen in the image, I have tinkered with the CSS properties of TreeItem, but this doesn't seem the proper strategy since the alignment seems to not be part of what can be controlled via CSS.
My TreeViewer is created like this:
private Control getTabControl_Tab1(final CTabFolder tabFolder)
final Composite composite = new Composite(tabFolder, SWT.NONE);
m_treeViewer_Plain = new TreeViewer(composite, SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER);
The LabelProvider, in case this is of any importance, extends LabelProvider.
I appear to be unable to find the place where this text is actually painted. If anybody could shed some light on this problem, I will be thankful forever
Powered by FUDForum
. Page generated in 0.02283 seconds