Change height of TreeItems in TreeViewer [message #1721421] |
Wed, 27 January 2016 11:28 |
|
Hello there,
im using a treeviewer in my application as a main feature. Due to the issue that it contains a lot of items i want to change the default height of the shown items. They should all take the same minimal height. I found the following solution, but it does not work exactly as i wish it to do:
trieeViewer.getTree().setData(RWT.CUSTOM_ITEM_HEIGHT, 20);
But after setting the height to 20, the tree looks ok but if you take a closer look charakters in the text label like a "g" or "p" are slidely cut on their bottom side. And when you select an item the marked selection area overlaps the upper item a bit and seems to be overlapped by the underlying item as well. (pictures below). Any idea how to fix that selection area and the problem that the text label seems to be cut off and is not placed exactly in the center of a treeItems area?
without setting the custom_item_height bit it looks like:
but the space taken by the items is to large for my usecase
it should look like:
but here the problem discribed above appears.
Any ideas?
Best regards
lars
-
Attachment: Unbenannt.PNG
(Size: 7.12KB, Downloaded 254 times) -
Attachment: 123.PNG
(Size: 8.17KB, Downloaded 267 times)
|
|
|
|
Re: Change height of TreeItems in TreeViewer [message #1721616 is a reply to message #1721440] |
Thu, 28 January 2016 16:03 |
|
Hi Ivan,
thanks for your quick reply. I implemented your suggestion by using the UI themes extension point:
<extension
point="org.eclipse.rap.ui.themes">
<themeContribution
file="Theme/themes.css"
themeId="pro.p1.PDT.TreeViewerTheme">
</themeContribution>
</extension>
But nothing changed in the appearance of my tree. I set an invalid input in the css file and my server threw an error on startup so it notes the css file. (if no error is in it no message is thrown).
I never used css theming before so it seems im doing sth wrong here
I tried all these "commands?" in the css file:
Tree-Cell {
padding: 1px 3px 1px 3px;
background-color: #000000;
}
Tree-RowOverlay {
background-color: #000000;
color: inherit;
background-image: none;
}
TreeItem:hover {
color: #00ff00;
background-color: #b5b5b5;
background-image: none;
}
TreeItem:selected {
color: #ff0080;
background-color: #ff8000;
background-image: none;
}
Tree {
background-color: #000000;
}
but none seems to have any impact.
What am i missing?
greetings, lars
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.02407 seconds