ScrolledForm, Form and ManagedForm [message #328881] |
Thu, 05 June 2008 20:45 ![Go to next message Go to next message](theme/Solstice/images/down.png) |
Eclipse User![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=) |
|
|
|
Originally posted by: bruce.skingle.org
Is there some reason why ManagedForm will only take a ScrolledForm and
not a Form?
ScrolledForm and Form seem to be entirely unrelated, which also seems a
little odd, I expected them both implement some IForm interface or that
a ScrolledForm would contain a Form.
I'm trying to use the message management provided by
ManagedForm.getMessageManager(), but the form contains mostly narrow
content with a single very wide table in the middle. It is inconvenient
to horizontally scroll the whole form, and the Table scroll bars do not
appear because the ScrolledForm just expands to accomodate the whole table.
I have a work around which involves making the form content a peer of
the ScrolledForm, but it's messy. It may be a bug, but with no content
the ScrolledForm want's it's body to be about 300 pixels high for the
first layout, after a resize of the Shell forces another layout the
ScrolledForm's body goes to zero height.
Is there some reason why it needs to be this way?
Thanks,
Bruce.
|
|
|
Re: ScrolledForm, Form and ManagedForm [message #328905 is a reply to message #328881] |
Fri, 06 June 2008 13:52 ![Go to previous message Go to previous message](theme/Solstice/images/up.png) ![Go to next message Go to next message](theme/Solstice/images/down.png) |
Eclipse User![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=) |
|
|
|
Originally posted by: eclipse-news.rizzoweb.com
Bruce Skingle wrote:
> Is there some reason why ManagedForm will only take a ScrolledForm and
> not a Form?
>
> ScrolledForm and Form seem to be entirely unrelated, which also seems a
> little odd, I expected them both implement some IForm interface or that
> a ScrolledForm would contain a Form.
>
> I'm trying to use the message management provided by
> ManagedForm.getMessageManager(), but the form contains mostly narrow
> content with a single very wide table in the middle. It is inconvenient
> to horizontally scroll the whole form, and the Table scroll bars do not
> appear because the ScrolledForm just expands to accomodate the whole table.
Try putting the table in a composite with GridLayout and setting the
table's GridData widthHint to 1. That should prevent the form from
growing to accommodate the table's real "preferred" width, which is
greedy by default. As long as the ScrolledForm's layout allows the table
container Composite to expand to fill available space, you should get
the table to expand as wide as the editor has space available but not
cause the form to scroll.
Hope this helps,
Eric
|
|
|
Re: ScrolledForm, Form and ManagedForm [message #328911 is a reply to message #328905] |
Fri, 06 June 2008 15:07 ![Go to previous message Go to previous message](theme/Solstice/images/up.png) |
Eclipse User![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=) |
|
|
|
Originally posted by: bruce.skingle.org
> Try putting the table in a composite with GridLayout and setting the
> table's GridData widthHint to 1. That should prevent the form from
> growing to accommodate the table's real "preferred" width, which is
> greedy by default. As long as the ScrolledForm's layout allows the table
> container Composite to expand to fill available space, you should get
> the table to expand as wide as the editor has space available but not
> cause the form to scroll.
>
> Hope this helps,
> Eric
That works, and it's a lot simpler than my current work around.
Thanks Eric.
|
|
|
Powered by
FUDForum. Page generated in 0.03818 seconds