Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Setup SashForm so that resize grows only one side
Setup SashForm so that resize grows only one side [message #443625] Tue, 28 September 2004 19:26 Go to next message
Ian Leslie is currently offline Ian LeslieFriend
Messages: 21
Registered: July 2009
Junior Member
I am trying to create a SashForm such that only one side grows or shrinks
when the parent is resized. I have a left hand side that contains some
control and a right hand side that contains a view. I want the control
side to remain the size the customer sets (by dnd of the sash bar) and the
view side to grow or shrink as the customer resizes the window.

Eclipse itself does this, Windows explorer does this but I can see nothing
on the SashForm API that would allow me to setup that behaviour.

I found this enhancement request
<https://bugs.eclipse.org/bugs/show_bug.cgi?id=6854> but it does not even
look like it is planned.

Am I missing some thing?

Ian

PS. I searched for uses of SashForm in the Eclipse source and did not
find it being used for the view / editor dividers. Is there perhaps a
different control I should be looking at?
Re: Setup SashForm so that resize grows only one side [message #443626 is a reply to message #443625] Tue, 28 September 2004 19:36 Go to previous messageGo to next message
Veronika Irvine is currently offline Veronika IrvineFriend
Messages: 1272
Registered: July 2009
Senior Member
Try the following snippet:

http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.swt.sni ppets/src/org/eclipse/swt/snippets/Snippet107.java?rev=HEAD& amp;content-type=text/vnd.viewcvs-markup

You can modify the FormData for the components to get the effect you desire.

"Ian Leslie" <ian.leslie@klocwork.com> wrote in message
news:cjcdtj$jrd$1@eclipse.org...
>I am trying to create a SashForm such that only one side grows or shrinks
> when the parent is resized. I have a left hand side that contains some
> control and a right hand side that contains a view. I want the control
> side to remain the size the customer sets (by dnd of the sash bar) and the
> view side to grow or shrink as the customer resizes the window.
>
> Eclipse itself does this, Windows explorer does this but I can see nothing
> on the SashForm API that would allow me to setup that behaviour.
>
> I found this enhancement request
> <https://bugs.eclipse.org/bugs/show_bug.cgi?id=6854> but it does not even
> look like it is planned.
>
> Am I missing some thing?
>
> Ian
>
> PS. I searched for uses of SashForm in the Eclipse source and did not
> find it being used for the view / editor dividers. Is there perhaps a
> different control I should be looking at?
>
>
Re: Setup SashForm so that resize grows only one side [message #443627 is a reply to message #443626] Tue, 28 September 2004 19:38 Go to previous message
Ian Leslie is currently offline Ian LeslieFriend
Messages: 21
Registered: July 2009
Junior Member
Thanks for answering so fast. After I sent this I continued my search
focusing on Sash and found that the Eclipse code uses it directly instead
of using SashForm and I have an example in the book I am reading that does
this kind of thing.

Now I have three examples to study.

Thanks,

Ian

Veronika Irvine wrote:

> Try the following snippet:

>
http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.swt.sni ppets/src/org/eclipse/swt/snippets/Snippet107.java?rev=HEAD& amp;content-type=text/vnd.viewcvs-markup

> You can modify the FormData for the components to get the effect you desire.

> "Ian Leslie" <ian.leslie@klocwork.com> wrote in message
<snip>
Previous Topic:How to handle An Invalid Thread Access Exception?
Next Topic:Pocket PC - Screen keyboard
Goto Forum:
  


Current Time: Thu May 09 17:16:18 GMT 2024

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

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

Back to the top