Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » virtual table
virtual table [message #46240] Wed, 12 September 2007 09:36 Go to next message
Eclipse UserFriend
Originally posted by: gschmoe.salomon.at

Hi!

I want ot display large amount of data in a table and thus I'm using the
VIRTUAL table concept. However, I have a problem with the SetData event.
In the M5 new and noteworthy the following example was given to populate
table items. I would like to use this for coloring, etc.

Table table = new Table( shell, SWT.VIRTUAL );
table.addListener( SWT.SetData, new Listener() {
public void handleEvent( final Event event ) {
TableItem item = ( TableItem )event.item;
int index = table.indexOf( item );
item.setText( "Item " + index );
}
} );
table.setItemCount( 300 );

This works for me for the number of rows that are initially visible. But,
when I scroll down to see other items, this event handler is not invoked
anymore... In SWT, in contrast, it is invoked and the code works. Anyone
an idea?


Ciao,
Gernot
Re: virtual table [message #46270 is a reply to message #46240] Wed, 12 September 2007 09:42 Go to previous messageGo to next message
Benjamin Muskalla is currently offline Benjamin MuskallaFriend
Messages: 237
Registered: July 2009
Senior Member
Hi Gernot,

maybe this could be interesting for you:

202237: [Table] Refresh problem with VIRTUAL Table
https://bugs.eclipse.org/bugs/show_bug.cgi?id=202237

Greets
Benny
Gernot Sch. wrote:
> Hi!
>
> I want ot display large amount of data in a table and thus I'm using the
> VIRTUAL table concept. However, I have a problem with the SetData event.
> In the M5 new and noteworthy the following example was given to populate
> table items. I would like to use this for coloring, etc.
>
> Table table = new Table( shell, SWT.VIRTUAL );
> table.addListener( SWT.SetData, new Listener() {
> public void handleEvent( final Event event ) {
> TableItem item = ( TableItem )event.item;
> int index = table.indexOf( item );
> item.setText( "Item " + index );
> }
> } );
> table.setItemCount( 300 );
>
> This works for me for the number of rows that are initially visible.
> But, when I scroll down to see other items, this event handler is not
> invoked anymore... In SWT, in contrast, it is invoked and the code
> works. Anyone an idea?
>
>
> Ciao,
> Gernot
>
Re: virtual table [message #46392 is a reply to message #46240] Wed, 12 September 2007 12:28 Go to previous message
Eclipse UserFriend
Originally posted by: gschmoe.salomon.at

Hi!

Sorry, this was a side-effect due to some other code. I tested virtual
table with a small snippet, and everything works nicely... :)

Thanks for the great work in RAP!

Gernot



Gernot Sch. wrote:

> Hi!

> I want ot display large amount of data in a table and thus I'm using the
> VIRTUAL table concept. However, I have a problem with the SetData event.
> In the M5 new and noteworthy the following example was given to populate
> table items. I would like to use this for coloring, etc.

> Table table = new Table( shell, SWT.VIRTUAL );
> table.addListener( SWT.SetData, new Listener() {
> public void handleEvent( final Event event ) {
> TableItem item = ( TableItem )event.item;
> int index = table.indexOf( item );
> item.setText( "Item " + index );
> }
> } );
> table.setItemCount( 300 );

> This works for me for the number of rows that are initially visible. But,
> when I scroll down to see other items, this event handler is not invoked
> anymore... In SWT, in contrast, it is invoked and the code works. Anyone
> an idea?


> Ciao,
> Gernot
Previous Topic:Error reporting
Next Topic:Filed to obtain life cycle
Goto Forum:
  


Current Time: Wed Apr 24 21:27:12 GMT 2024

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

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

Back to the top