Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » setLineBackground doesn't work well with wrapped text in StyledText widget
setLineBackground doesn't work well with wrapped text in StyledText widget [message #440043] Wed, 21 July 2004 18:16 Go to next message
ZhongMing Chen is currently offline ZhongMing ChenFriend
Messages: 2
Registered: July 2009
Junior Member
Hi,

I can not get setLineBackground working on my StyledText widget with wrapped
text.

This is the scenario:

Line 1
Line 2
Line 3, a long line with wrapped text
Line 3 continued
Line 4
Line 5

What I want to achieve is to set background color for line 2, 3, 4.

However, when I used setLineBackground( 2, 3, Color ), the widget doesn't
draw the background color appropiate. It works fine if line 3 is NOT
wrapped.

I tried a different approach, I called setLineBackground( 2, 1, Color ),
setLineBackground( 3, 1, Color ) , setLineBackground( 4, 1, Color )
together. The situation is a little bit better, but the background is still
not correct.

Just wondering whether setLineBackground works with wrapped text or not, and
how to use it? Is it the way that I am coding with is wrong?

Any light would be greatly appreciated!


Ming
Re: setLineBackground doesn't work well with wrapped text in StyledText widget [message #440113 is a reply to message #440043] Thu, 22 July 2004 15:32 Go to previous message
Steve Northover is currently offline Steve NorthoverFriend
Messages: 1636
Registered: July 2009
Senior Member
Looks like a bug. Enter a bug report.

<chenz@ca.ibm.com> wrote in message news:cdmbs4$hb5$1@eclipse.org...
> Hi,
>
> I can not get setLineBackground working on my StyledText widget with
wrapped
> text.
>
> This is the scenario:
>
> Line 1
> Line 2
> Line 3, a long line with wrapped text
> Line 3 continued
> Line 4
> Line 5
>
> What I want to achieve is to set background color for line 2, 3, 4.
>
> However, when I used setLineBackground( 2, 3, Color ), the widget doesn't
> draw the background color appropiate. It works fine if line 3 is NOT
> wrapped.
>
> I tried a different approach, I called setLineBackground( 2, 1, Color ),
> setLineBackground( 3, 1, Color ) , setLineBackground( 4, 1, Color )
> together. The situation is a little bit better, but the background is
still
> not correct.
>
> Just wondering whether setLineBackground works with wrapped text or not,
and
> how to use it? Is it the way that I am coding with is wrong?
>
> Any light would be greatly appreciated!
>
>
> Ming
>
>
>
>
Previous Topic:MessageDialog
Next Topic:Table problems with Composite
Goto Forum:
  


Current Time: Tue Apr 16 19:55:03 GMT 2024

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

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

Back to the top