Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Virtual Table an BackgoringColor of Tableitem after refresh
Virtual Table an BackgoringColor of Tableitem after refresh [message #449358] Mon, 24 January 2005 15:24 Go to next message
Andreas Krieg is currently offline Andreas KriegFriend
Messages: 5
Registered: July 2009
Junior Member
Hi all,

I have a virtual table and each TableItem may have a different
BackGroundColor which ist set in the SWT.SetData Listener:

if(index % 2 > 0)
item.setBackground(_parent.getDisplay().getSystemColor(SWT.C OLOR_WIDGET_LIGHT_SHADOW));

This works fine but if I make a refresh of the table with:

table.removeAll();
table.setItemCount(jobs.size());

the table will be refreshed, all TableItems will have a white backgorund
color but the Listener was called after the refresh!?

So, what I am doing wrong, is there another way (perhaps the right one) to
refresh content of the table?

Thanks alot

Andreas
Re: Virtual Table an BackgoringColor of Tableitem after refresh [message #449364 is a reply to message #449358] Mon, 24 January 2005 17:17 Go to previous message
Steve Northover is currently offline Steve NorthoverFriend
Messages: 1636
Registered: July 2009
Senior Member
The way to refresh a virtual table is using Table.clearAll().

"Andreas Krieg" <ak.zps@t-online.de> wrote in message
news:ct3402$35v$1@www.eclipse.org...
> Hi all,
>
> I have a virtual table and each TableItem may have a different
> BackGroundColor which ist set in the SWT.SetData Listener:
>
> if(index % 2 > 0)
>
item.setBackground(_parent.getDisplay().getSystemColor(SWT.C OLOR_WIDGET_LIGH
T_SHADOW));
>
> This works fine but if I make a refresh of the table with:
>
> table.removeAll();
> table.setItemCount(jobs.size());
>
> the table will be refreshed, all TableItems will have a white backgorund
> color but the Listener was called after the refresh!?
>
> So, what I am doing wrong, is there another way (perhaps the right one) to
> refresh content of the table?
>
> Thanks alot
>
> Andreas
>
>
Previous Topic:No Application Window in task bar
Next Topic:Border around disabled Text in Eclipse Form
Goto Forum:
  


Current Time: Fri Mar 29 11:43:37 GMT 2024

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

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

Back to the top