| Summary: | Layout calculation causes virtual table items to be initialized | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [RT] RAP | Reporter: | Thomas Kratz <eiswind> | ||||
| Component: | RWT | Assignee: | Project Inbox <rap-inbox> | ||||
| Status: | RESOLVED INVALID | QA Contact: | |||||
| Severity: | major | ||||||
| Priority: | P3 | ||||||
| Version: | unspecified | ||||||
| Target Milestone: | --- | ||||||
| Hardware: | PC | ||||||
| OS: | Windows 7 | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
|
Description
Thomas Kratz
Created attachment 215589 [details]
Snippet to reproduce
I am glad that I could reproduce this one outside of my application. It's all about using a GridLayout. If you comment out the GridLayout everything is fine. If you use the GridLayout, the TableItems get initialized and the whole little thing is broken completely.
Thomas, I can reproduce it with your snippet, but I think that your code is not so correct. The grid cell, where the table is, become 24000 pixels in height. And the table becomes 24000 pixels in height too. This is the reason why all items are materialized. I'm not sure if this is a bug or GridLayout behaves that way (have to check your snippet against SWT). Setting layout data for the Table fixes the issue: ... viewer = new TableViewer( parent, SWT.VIRTUAL ); GridData tableData = new GridData( SWT.FILL, SWT.FILL, true, true ); viewer.getTable().setLayoutData( tableData ); ... Just checked it in SWT and the Table have the same huge ~20000 pixels height. I think that the bug is invalid. Thomas, please reopen if you disagree. I guess it's then that I have the GridLayout (I have the LayoutData in my code) in a ScrolledForm (that indeed can grow in size) that makes the Table explode in size. Looks like this is the intended behaviour. Have to think about how to workaround this tonight :) Thanks for clearing that up with me! |