Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Can any one explain about Sash and Sash forms?
Can any one explain about Sash and Sash forms? [message #435655] Sun, 21 August 2005 09:47 Go to next message
Eclipse UserFriend
Originally posted by: bharathkumar.a.gmail.com

Hi,
Can any one explain about how sash and sash forms work? I have seen
some code snippets, but couldn't understand anything?

Bharath
Re: Can any one explain about Sash and Sash forms? [message #435659 is a reply to message #435655] Mon, 22 August 2005 08:17 Go to previous message
Stephen Rowles is currently offline Stephen RowlesFriend
Messages: 14
Registered: July 2009
Junior Member
Bharath wrote:
> Hi,
> Can any one explain about how sash and sash forms work? I have seen
> some code snippets, but couldn't understand anything?
>
> Bharath

Not sure about sash, but I use sash forms as follows:

Lets say you want a page with a top and bottom composite, and a nice
sash bar in between to allow you to change the relative sizes.

Create a new SashFrom form your parent shell, specify SWT.VERTICAL to
tell the form that you want the components arranged vertically:

SashForm sash = new SashForm(parent, SWT.VERTICAL)

now create your two new composites and with a parent of the sash form:

Composite top = new Composite(sash, SWT.NONE);
Composite bottom = new Composite(sash, SWT.NONE);

Then set the weights of your sash to determin how big they initially are
relative to each other, in this case we want the top form to take up 75
percent of the space and the botton the remaining 25:

sash.setWeights(new int[]{75, 25});

Then simply add your controls and layouts to either the top composite,
or the bottom composite as appropriate.

Hope this helps.
Previous Topic:FocusListener in a ViewPart
Next Topic:Building RCP Applications
Goto Forum:
  


Current Time: Sun Dec 08 23:05:24 GMT 2024

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

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

Back to the top