Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
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 Go to next message
Tom H is currently offline Tom HFriend
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 Go to previous messageGo to next message
Rüdiger Herrmann is currently offline Rüdiger HerrmannFriend
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 Go to previous message
Eclipse UserFriend
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
>
>
>
>
>
>
Previous Topic:why swt classes in the RAP demo examples?
Next Topic:Web Enabling RCP Application
Goto Forum:
  


Current Time: Thu Apr 25 01:10:20 GMT 2024

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

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

Back to the top