Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 191262

Summary: computeSize for a Tree only measures first level treeitems
Product: [Eclipse Project] Platform Reporter: Randy Hudson <hudsonr>
Component: SWTAssignee: Platform-SWT-Inbox <platform-swt-inbox>
Status: RESOLVED DUPLICATE QA Contact:
Severity: normal    
Priority: P3 CC: snorthov
Version: 3.3   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Randy Hudson CLA 2007-06-06 09:58:59 EDT
computeSize only iterates through TreeItems at the root of the tree. I'm looking for the size of the tree's contents, based on which items are currently expanded. It seems like computeSize should be doing this, or at least there should be a way of asking for the size from the tree which, when applied, would cause the scrollbars to disappear. (I suppose it's impossible to create a Tree without Scrollbars?)

A workaround which I haven't tried yet might be to recursively count how many items are visible, subtract the items at the root level, multiply by the row height, and add that to the results of compute Size. I don't know if width needs to be addressed as well.
Comment 1 Steve Northover CLA 2007-06-06 10:05:23 EDT

*** This bug has been marked as a duplicate of bug 49724 ***