Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » OwnerDrawLabelProvider and GC.drawText() issue(Unwanted text highlighting)
OwnerDrawLabelProvider and GC.drawText() issue [message #1496083] Tue, 02 December 2014 19:25
Csaba Mészáros is currently offline Csaba MészárosFriend
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.
Previous Topic:StyledText
Next Topic:Obtain combo box key from its value
Goto Forum:
  


Current Time: Thu Apr 25 00:46:42 GMT 2024

Powered by FUDForum. Page generated in 0.02564 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top