Property Sheet

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

Property Sheet

Postby pepe_ciardelli » Wed Feb 06, 2008 6:11 am

Hi there,

This is not really a question about SWT-Designer functionality, but as your lovely property sheet does a few things I can't figure out how to do, I would be extremely grateful if you could help with the following.

I am building a property sheet by cramming together a table viewer and a tree viewer. The constructor:

Code: Select all
   public PropertySheetViewer(Composite parent) {
      // Note: SWT.FULL_SELECTION hides lines connecting nodes
      super(parent, SWT.BORDER | SWT.FULL_SELECTION);

      this.getTree().setLayoutData(new GridData(SWT.RIGHT, SWT.FILL, false, true));
      // create a column for property fields
      propertyFieldColumn = new TreeViewerColumn(this, SWT.NONE);
      propertyFieldColumn.setLabelProvider(new ColumnLabelProvider() {
         public String getText(Object element) {
             return ((PropertySheetNode) element).getPropertyField();
      // create a column for property values      
      propertyValueColumn = new TreeViewerColumn(this, SWT.NONE);
      this.getTree().setSize(200, 300);

You can see the results at

There are 3 presentation-related issues I'm unable to solve:

1) How do I get rid of the excess "3rd column"?
2) I have used SWT.FULL_SELECTION to get rid of the lines connecting nodes in the tree - how do I get rid of the extra space where the lines used to be?
3) I would like to get rid of the table row borders for empty rows, i.e. I would like there to be nothing but blank space after the rows with data - any ideas?

Many, many thanks in advance,
Pepe Ciardelli
Posts: 1
Joined: Wed Feb 06, 2008 6:04 am

Re: Property Sheet

Postby Eric Clayberg » Wed Feb 06, 2008 11:13 am

The property sheet used in SWT Designer is a custom, owner drawn widget.

We don't use the Eclipse table viewer or tree viewer because they aren't very flexible.
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