Vertical Alignment Of Sections

SWT Designer allows you to create the views, editors, perspectives, pref pages, composites, etc. that comprise Eclipse SWT & RCP applications and plug-ins.

Moderators: Konstantin.Scheglov, gnebling, Alexander.Mitin, jwren, Eric Clayberg

Vertical Alignment Of Sections

Postby Clip » Wed May 14, 2008 3:58 am


I've a Section which I tell to align vertically.
Code: Select all
Section section = toolkit.createSection(form.getBody(), Section.TITLE_BAR | Section.FOCUS_TITLE | Section.EXPANDED | Section.TWISTIE);
TableWrapData data = new TableWrapData(TableWrapData.FILL);
data.align = TableWrapData.FILL;
data.grabVertical = true;

The Code above is generated by the SWT-Designer.

When adding controls into the sections client, the sections height is always just as high as the accumulated content of its client.
Sections covering all available vertical space wether there content requires it or not can be seen in the plugin manifeft editor ('Rutime' or 'Extensions' Tab).

My question is, how can I make my section as high as the FormEditor (ManagedForm), just as it can be seen in the plugin manifest editor?

Posts: 1
Joined: Tue May 13, 2008 11:57 pm

Re: Vertical Alignment Of Sections

Postby Eric Clayberg » Thu May 15, 2008 4:05 am

This is expected behavior for TableWrapLayout.

See the comments in TableWrapData...

Code: Select all
   * If <code>true</code>, take part in excess horizontal space
   * distribution. (default is <code>false</code>).
   public boolean grabHorizontal;

   * If <code>true</code>, will grab any excess vertical space (default is
   * <code>false</code>). Note that since TableWrapLayout works top-down
   * and does not grows to fill the parent, this only applies to local excess
   * space created by fixed-height children that span multiple rows.
   public boolean grabVertical;
Eric Clayberg
Software Engineering Manager

Author: "Eclipse Plug-ins"
Eric Clayberg
Posts: 4503
Joined: Tue Sep 30, 2003 6:39 am
Location: Boston, MA USA

Return to SWT Designer

Who is online

Users browsing this forum: No registered users and 2 guests