Skip to main content



      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 14:16 Go to next message
Eclipse UserFriend
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 11:32 Go to previous message
Eclipse UserFriend
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: Thu Jul 03 06:38:10 EDT 2025

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

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

Back to the top