virtual table [message #46240] |
Wed, 12 September 2007 09:36 |
Eclipse User |
|
|
|
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 |
Benjamin Muskalla 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 |
Eclipse User |
|
|
|
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
|
|
|
Powered by
FUDForum. Page generated in 0.04842 seconds