Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » ScrolledForm, Form and ManagedForm
ScrolledForm, Form and ManagedForm [message #328881] Thu, 05 June 2008 20:45 Go to next message
Eclipse UserFriend
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 messageGo to next message
Eclipse UserFriend
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
Eclipse UserFriend
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.
Previous Topic:API for reloading Eclipse target platform
Next Topic:Get eclipse to read class-path from manifest
Goto Forum:
  


Current Time: Sat Nov 09 03:20:27 GMT 2024

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

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

Back to the top