| 
| ScrolledComposite height with SWT.WRAP Text widgets [message #128522] | Sun, 19 April 2009 04:19  |  | 
| Eclipse User  |  |  |  |  | Originally posted by: peterka.jiri.gmail.com 
 Hi all,
 
 I have such a case: There is ScrolledComposite, inside it there is
 Composite containing list of Text widgets. When these Text widgets have
 SWT.WRAP set, height of inner Composite isn't computed right and it's
 unable reach some elements of the list. When SWT.WRAP is removed and
 text isn't wrapped then everything is all right.
 
 * is it a bug? (RAP 1.1)
 * how could I manually compute correct minimal height when SWT.WRAP is set?
 
 Best regards
 
 Jiri
 |  |  |  | 
| 
| Re: ScrolledComposite height with SWT.WRAP Text widgets [message #128678 is a reply to message #128522] | Mon, 20 April 2009 05:28  |  | 
| Eclipse User  |  |  |  |  | Hi Jiri, 
 > I have such a case: There is ScrolledComposite, inside it there is
 > Composite containing list of Text widgets. When these Text widgets have
 >  SWT.WRAP set, height of inner Composite isn't computed right and it's
 > unable reach some elements of the list. When SWT.WRAP is removed and
 > text isn't wrapped then everything is all right.
 >
 > * is it a bug? (RAP 1.1)
 
 To find out whether this is a bug, you'd have to try your snippet with
 SWT. If it works there, but not in RAP, then it is probably a bug. The
 ScrolledComposite is a complicated beast and it's easily screwed up.
 Thus, you should also have a look at the SWT snippets [1] and try the
 same thing with SWT.
 
 > * how could I manually compute correct minimal height when SWT.WRAP is
 set?
 
 Your problem could be related to bug 256133: [TextSizeDetermination]
 Re-layouting for controls in a ScrolledComposite
 https://bugs.eclipse.org/bugs/show_bug.cgi?id=256133
 
 Does the problem persist when you reload the application in the browser?
 Do the Text widgets contain a fixed default text?
 
 You could also experiment with calling layout() on the Composite at some
 point in time, but you'll have to do this after the text has been set
 AND the results of the text size determination have been received, i.e.
 in a subsequent request.
 
 Hope this helps, Ralf
 
 [1] http://www.eclipse.org/swt/snippets/
 |  |  |  | 
Powered by 
FUDForum. Page generated in 0.05533 seconds