Bug 46112 - Please provide some means to compute one dimension of a control's size, given the other (known) dimension
Summary: Please provide some means to compute one dimension of a control's size, given...
Status: NEW
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows XP
: P3 enhancement with 2 votes (vote)
Target Milestone: ---   Edit
Assignee: Veronika Irvine CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 45874 90232 (view as bug list)
Depends on:
Blocks: 9866
  Show dependency tree
 
Reported: 2003-11-05 12:25 EST by Stefan Xenos CLA
Modified: 2019-09-06 16:08 EDT (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Stefan Xenos CLA 2003-11-05 12:25:15 EST
SWT needs to expose some way to compute the height of a control given its width
(and visa versa). 

Control.computeSize does not behave as documented. It takes the inner content
size (the size of the control minus trim) as hints, not the actual control size.
SWT does not provide API to compute the trim size of a control given its outer
dimensions, and layouts only have knowledge of the outer dimensions of child
controls.

This enhancement asks for one of the following:

1. Change the implementation of computeSize to match its JavaDoc and the way it
is being used in Eclipse.
2. Provide a new method whose behavior matches the JavaDoc for computeSize.
3. Provide a new method that returns a control's trim given its outer dimensions.

Personally, I would prefer option 1. This would simplify code within SWT, and
would fix downstream bugs in apps that expect computeSize to behave as
documented. Options 2 or 3 would require updating the JavaDoc for computeSize to
describe the actual behavior of computeSize.

This is required in order for ANY layout to correctly handle wrapping text.

See bug 45874 for more details
Comment 1 Stefan Xenos CLA 2003-11-05 12:27:11 EST
*** Bug 45874 has been marked as a duplicate of this bug. ***
Comment 2 Steve Northover CLA 2004-04-12 15:43:44 EDT

*** This bug has been marked as a duplicate of 9866 ***
Comment 3 Stefan Xenos CLA 2004-11-16 14:18:33 EST
Reopening. Bug 9866 was closed without solving this issue.
Comment 4 Steve Northover CLA 2004-11-16 15:06:21 EST
It was bogusly marked as a dup.  That's why it was closed.
Comment 5 Randy Hudson CLA 2005-05-11 16:45:27 EDT
*** Bug 90232 has been marked as a duplicate of this bug. ***
Comment 6 Stefan Xenos CLA 2005-07-18 12:10:44 EDT
See bug 46112, bug 104234, and bug 103863. These are the three biggest issues
that are complicating the workbench layouts.
Comment 7 Stefan Xenos CLA 2008-06-12 17:24:29 EDT
This is still a problem.
Comment 8 Eclipse Webmaster CLA 2019-09-06 16:08:42 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.