Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » ScrolledComposite height with SWT.WRAP Text widgets
ScrolledComposite height with SWT.WRAP Text widgets [message #128522] Sun, 19 April 2009 08:19 Go to next message
Eclipse UserFriend
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 09:28 Go to previous message
Ralf Sternberg is currently offline Ralf SternbergFriend
Messages: 1313
Registered: July 2009
Senior Member

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/
Previous Topic:Context Disposed Problem
Next Topic:Issues
Goto Forum:
  


Current Time: Fri Dec 03 06:32:11 GMT 2021

Powered by FUDForum. Page generated in 0.02589 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top