Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Nebula » Nebula grid GridItem.setForeground(color) not working
Nebula grid GridItem.setForeground(color) not working [message #1700884] Tue, 07 July 2015 20:54 Go to next message
Dhiresh Patel  is currently offline Dhiresh Patel Friend
Messages: 86
Registered: July 2009
Member
I am using GridTableViewer and Nebula Grid.
I am in processing of replacing old grid with new grid
version = org.eclipse.nebula.widgets.grid_1.0.0.201506030727.

I am setting individual row's foreground color.

for ( int i=0; i < items.length; i++){
items[i].setForeground(color); ;
}

The above code worked with old grid version ver = 1.0.0.201209220511

However it's not working with new version. What do I need to change?

Thanks
Dhiresh
Re: Nebula grid GridItem.setForeground(color) not working [message #1700891 is a reply to message #1700884] Tue, 07 July 2015 22:53 Go to previous messageGo to next message
Dhiresh Patel  is currently offline Dhiresh Patel Friend
Messages: 86
Registered: July 2009
Member
I have grid.setCellSelectionEnabled(true);

What I found was that if I did GridItem.setForeground(index, foreground); for
all the columns it works - meaning the whole row has that foreground color.

But GridItem.setForeground(foreground); does not work -
Has this been changed?

Thanks,

Dhiresh
Re: Nebula grid GridItem.setForeground(color) not working [message #1700922 is a reply to message #1700891] Wed, 08 July 2015 08:19 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6410
Registered: July 2009
Senior Member
If you are using a GridTableViewer why are you then calling out to the
SWT-API? It is the job of the LabelProvider to provide the foreground
color.

If you can reproduce this:
a) with a Grid only snippet (no JFace viewer)
b) with a GridTableViewer only snippet (no call to GridItem)

File a bug and we can take a look if this is a regression

Tom

On 08.07.15 00:53, Dhiresh Patel wrote:
> I have grid.setCellSelectionEnabled(true);
>
> What I found was that if I did GridItem.setForeground(index,
> foreground); for
> all the columns it works - meaning the whole row has that foreground color.
>
> But GridItem.setForeground(foreground); does not work - Has this been
> changed?
>
> Thanks,
>
> Dhiresh
Re: Nebula grid GridItem.setForeground(color) not working [message #1708941 is a reply to message #1700922] Tue, 22 September 2015 15:55 Go to previous message
Dhiresh Patel  is currently offline Dhiresh Patel Friend
Messages: 86
Registered: July 2009
Member
This problem has been fixed.
https://bugs.eclipse.org/bugs/show_bug.cgi?id=477643
Previous Topic:XYGraph - how to draw data points with no connecting line?
Next Topic:Copy feature inside Nebula Grid
Goto Forum:
  


Current Time: Tue Sep 18 21:07:38 GMT 2018

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

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

Back to the top