Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » SWT redraw all visible rows on an insert
SWT redraw all visible rows on an insert [message #466668] Thu, 12 January 2006 19:11 Go to next message
Eclipse UserFriend
Originally posted by: vadalus.gmail.com

hi guys,

i have an application which uses a SWT table, this table has rows inserted
reasonably frequently (a couple of rows every minute) usually grows to
about 5000 rows during the day.

i am getting compliants from my users because the ALL visible rows in the
table redraw themselves whenever a new row is add, causing flicker.

Is there anyway to stop the table doing this, i looked through all the
current posts on this topic and have tried all the usual stuff.

As far as I am concerned the table redraw should be exactly the same as
when you scroll, the table should not remove all rows and then add them
again

(note: all I am ultimately doing is creating a TableItem and adding it to
0th row, no messing with redraws or anything like that)
Re: SWT redraw all visible rows on an insert [message #466671 is a reply to message #466668] Thu, 12 January 2006 19:46 Go to previous messageGo to next message
Veronika Irvine is currently offline Veronika IrvineFriend
Messages: 1272
Registered: July 2009
Senior Member
If you are inserting a row at index 0 you are essentially moving all rows
down by one and therefore causing all rows to be redrawn. (The guy that was
0 is now 1, the guy that was 1 is now 2, etc) Why are you inserting at 0?

"vadalus" <vadalus@gmail.com> wrote in message
news:920d39674a0fa92c074e2c6ae084e761$1@www.eclipse.org...
> hi guys,
>
> i have an application which uses a SWT table, this table has rows inserted
> reasonably frequently (a couple of rows every minute) usually grows to
> about 5000 rows during the day.
>
> i am getting compliants from my users because the ALL visible rows in the
> table redraw themselves whenever a new row is add, causing flicker.
>
> Is there anyway to stop the table doing this, i looked through all the
> current posts on this topic and have tried all the usual stuff.
> As far as I am concerned the table redraw should be exactly the same as
> when you scroll, the table should not remove all rows and then add them
> again
>
> (note: all I am ultimately doing is creating a TableItem and adding it to
> 0th row, no messing with redraws or anything like that)
>
Re: SWT redraw all visible rows on an insert [message #466674 is a reply to message #466671] Thu, 12 January 2006 21:02 Go to previous messageGo to next message
vadalis is currently offline vadalisFriend
Messages: 43
Registered: July 2009
Member
Hi,

I am inserting it at 0 because I want it added to the top of the table.
Surely there should be no difference (in terms of how you redraw the
table) between adding a row at 0 and scrolling down 1 row. The table
should redraw all the rows (of course) but it should not remove all the
rows AND THEN redraw them which is what is it doing, which is why it looks
bad. It should XOR the difference, which is why you do not get flicker
when scrolling, could this be a double buffering issue?
Re: SWT redraw all visible rows on an insert [message #466676 is a reply to message #466674] Fri, 13 January 2006 02:38 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: vadalus.gmail.com

p.s. this gets worse as you add more columns to the table. You cannot see
it with just 1 column, add 20 and it becomes quite obvious.
Re: SWT redraw all visible rows on an insert [message #466799 is a reply to message #466674] Tue, 17 January 2006 19:26 Go to previous messageGo to next message
Steve Northover is currently offline Steve NorthoverFriend
Messages: 1636
Registered: July 2009
Senior Member
There is no way around it. If you insert at location 0, all the rows below
the table must redraw. If you are running on XP using the XP manifest file,
then some of the flicker will go away Version 6.0 of comctl32.dll does a
better job of redrawing.

"vadalus" <vadalus@pobox.com> wrote in message
news:183eeb127cc8cbaf7aedaad1c0fac5fe$1@www.eclipse.org...
> Hi,
>
> I am inserting it at 0 because I want it added to the top of the table.
> Surely there should be no difference (in terms of how you redraw the
> table) between adding a row at 0 and scrolling down 1 row. The table
> should redraw all the rows (of course) but it should not remove all the
> rows AND THEN redraw them which is what is it doing, which is why it looks
> bad. It should XOR the difference, which is why you do not get flicker
> when scrolling, could this be a double buffering issue?
>
Re: SWT redraw all visible rows on an insert [message #467070 is a reply to message #466799] Tue, 24 January 2006 03:04 Go to previous message
Eclipse UserFriend
Originally posted by: vadalus.gmail.com

HI Steve,

Yeah thanks, it's more that when the table redraws, it removes all the
visible entries (so a blank table for a couple of miliseconds) and then
redraws the new rows. It should do this in an off screen buffer and just
draw the final result.

As I said, comparing the redraw with what happens when the table scrolls
(which also requires all the rows to be redrawn) looks very different.

I will try with the new manifest file though, thanks.

Liam
Previous Topic:Saving Webpage Data
Next Topic:How to refresh a Combo ?
Goto Forum:
  


Current Time: Tue May 21 18:29:37 GMT 2019

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

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

Back to the top