Home » Eclipse Projects » Remote Application Platform (RAP) » setBackground(index, Color) setting all subsequent columns as well
setBackground(index, Color) setting all subsequent columns as well [message #117103] |
Tue, 23 December 2008 17:42  |
Tom H Messages: 139 Registered: July 2009 |
Senior Member |
|
|
If I create a TableItem with 10 columns and set the background with;
item.setBackground( Graphics.getColor(255,255,255) );
item.setBackground(1, Graphics.getColor(255,228,225) );
item.setBackground(2, Graphics.getColor(0,191,255));
Column index 0 is white, 1 is pink and 2 through 9 are blue. So it seems
that the setBackground(index,color) method is overriding the default for
the rest of the Row - it is not overriding the initial default from the
setBackground(Color) method, because a workaround like this;
item.setBackground( Graphics.getColor(255,255,255) );
item.setBackground(1, Graphics.getColor(255,228,225) );
item.setBackground(2, Graphics.getColor(0,191,255));
item.setBackground(3, Graphics.getColor(255,255,255) );
does not work. This is in the 1.1.1.20080917-1625 package.
Cheers,
Tom
|
|
|
Re: setBackground(index, Color) setting all subsequent columns as well [message #117118 is a reply to message #117103] |
Tue, 23 December 2008 18:03   |
Rüdiger Herrmann Messages: 581 Registered: July 2009 |
Senior Member |
|
|
Tom,
please search the bugzilla database [1] before reporting resolved or
already known issues.
This particular bug was fixed in 1.2M3. See here for further details:
223890: [Table] Cell background reflect on the background
of the next cell
https://bugs.eclipse.org/bugs/show_bug.cgi?id=223890
Cheers,
Rüdiger
[1] http://www.eclipse.org/rap/bugs.php
Tom H wrote:
>
> If I create a TableItem with 10 columns and set the background with;
>
> item.setBackground( Graphics.getColor(255,255,255) );
> item.setBackground(1, Graphics.getColor(255,228,225) );
> item.setBackground(2, Graphics.getColor(0,191,255));
>
> Column index 0 is white, 1 is pink and 2 through 9 are blue. So it seems
> that the setBackground(index,color) method is overriding the default for
> the rest of the Row - it is not overriding the initial default from the
> setBackground(Color) method, because a workaround like this;
>
> item.setBackground( Graphics.getColor(255,255,255) );
> item.setBackground(1, Graphics.getColor(255,228,225) );
> item.setBackground(2, Graphics.getColor(0,191,255));
> item.setBackground(3, Graphics.getColor(255,255,255) );
>
> does not work. This is in the 1.1.1.20080917-1625 package.
> Cheers,
>
> Tom
>
>
>
>
>
>
|
|
|
Re: setBackground(index, Color) setting all subsequent columns as well [message #117130 is a reply to message #117103] |
Tue, 23 December 2008 18:04  |
Eclipse User |
|
|
|
Originally posted by: ifurnadjiev.innoopract.com
Hi Tom,
this is known issue with version 1.1.1 and it is fixed in 1.2M3.
[Table] Cell background reflect on the background of the next cell
https://bugs.eclipse.org/bugs/show_bug.cgi?id=223890
Best,
Ivan
Tom H wrote:
>
> If I create a TableItem with 10 columns and set the background with;
>
> item.setBackground( Graphics.getColor(255,255,255) );
> item.setBackground(1, Graphics.getColor(255,228,225) );
> item.setBackground(2, Graphics.getColor(0,191,255));
>
> Column index 0 is white, 1 is pink and 2 through 9 are blue. So it
> seems that the setBackground(index,color) method is overriding the
> default for the rest of the Row - it is not overriding the initial
> default from the setBackground(Color) method, because a workaround
> like this;
>
> item.setBackground( Graphics.getColor(255,255,255) );
> item.setBackground(1, Graphics.getColor(255,228,225) );
> item.setBackground(2, Graphics.getColor(0,191,255));
> item.setBackground(3, Graphics.getColor(255,255,255) );
>
> does not work. This is in the 1.1.1.20080917-1625 package.
> Cheers,
>
> Tom
>
>
>
>
>
>
|
|
|
Goto Forum:
Current Time: Fri Dec 08 07:30:53 GMT 2023
Powered by FUDForum. Page generated in 0.01869 seconds
|