OwnerDrawLabelProvider and GC.drawText() issue [message #1496083] |
Tue, 02 December 2014 19:25 |
Csaba Mészáros Messages: 4 Registered: December 2013 |
Junior Member |
|
|
Hello!
I have the following problem:
On Windows 7 I am writing program using JFace TableViewer with a class that extends OwnerDrawLabelProvider class. I have a complicated task to fulfill:
1. Manage alternation of row colors (solved): I am setting the background color of the TableItem found in the paint() event so the rows are painted with alternated colors.
2. Draw multi-line text with varying font sizes (solved): inside the paint() event.
What I cannot solve is making the text's background transparent:
- If i do not use the boolean flag in drawText(), then the text has a white background, so it is very ugly, when the mouse hovers over the row or selects the row.
- If I have SWT.DRAW_TRANSPARENT set, then the background is transparent, however, there's a reddish "halo" around the letters, so It looks quite annoying.
I simply don't know how to get rid of this issue. I would appreciate any solution!
What I need: A multiline cell label provider with drawing support, with alternated row colors, which would look natively - with sharp text painted.
|
|
|
Powered by
FUDForum. Page generated in 0.02564 seconds