Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 191262 - computeSize for a Tree only measures first level treeitems
Summary: computeSize for a Tree only measures first level treeitems
Status: RESOLVED DUPLICATE of bug 49724
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 3.3   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform-SWT-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-06-06 09:58 EDT by Randy Hudson CLA
Modified: 2007-06-06 10:05 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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 ***