Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Background color when editing table row
Background color when editing table row [message #445441] Fri, 05 November 2004 18:09 Go to next message
Alain  is currently offline Alain Friend
Messages: 115
Registered: July 2009
Senior Member
Hi,

I am trying to implement a widget using the Table widget to behave more
like a Swing JTable. What I what to achieve is to have a table on which
you would not see any rows when empty, and only when adding rows using a
button you would see them. I changed the background color to grey so
intially the table looks empty. Then, when the user click "add row", I had
a TableItem and set the background color of it wo white, so the user see
this row. The problem is when the user edits a cell, the row background
color switch to grey, which looks like the row disapeared (even if you can
actually type in the cell). I changed the cell editor control background
color, but this only work the the editited cell and not for the other
cells of the same row.

I am on the wrong path? Is there any way to change the row background
color in edit mode?

Thanks!
Re: Background color when editing table row [message #445640 is a reply to message #445441] Mon, 08 November 2004 15:54 Go to previous message
Steve Northover is currently offline Steve NorthoverFriend
Messages: 1636
Registered: July 2009
Senior Member
Yes, the native table widget is not a JTable. Rather than forcing it's
vision on SWT, you should attempt to use the table widget in the same manner
as other native applications on the desktop. Attempts to trick it will fail
on different platforms and in the presence of theme managers. For example,
Windows is the only platform that draws the table selection in a gray color
when the table does not have focus.

"Alain" <spamdeadhole@yahoo.ca> wrote in message
news:cmgflj$gtc$1@eclipse.org...
> Hi,
>
> I am trying to implement a widget using the Table widget to behave more
> like a Swing JTable. What I what to achieve is to have a table on which
> you would not see any rows when empty, and only when adding rows using a
> button you would see them. I changed the background color to grey so
> intially the table looks empty. Then, when the user click "add row", I had
> a TableItem and set the background color of it wo white, so the user see
> this row. The problem is when the user edits a cell, the row background
> color switch to grey, which looks like the row disapeared (even if you can
> actually type in the cell). I changed the cell editor control background
> color, but this only work the the editited cell and not for the other
> cells of the same row.
>
> I am on the wrong path? Is there any way to change the row background
> color in edit mode?
>
> Thanks!
>
Previous Topic:setting up wizard pages between clicking "next"
Next Topic:Maximize on Windows
Goto Forum:
  


Current Time: Sat Oct 31 14:28:58 GMT 2020

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

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

Back to the top