(C)TabFolder with multiple (C)TabItems using Forms Error

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

(C)TabFolder with multiple (C)TabItems using Forms Error

Postby scott.klein » Wed Sep 28, 2005 2:31 am

This is an issue I have just run across upon converting some GUIs to use SWT Forms. It occurs using either TabFolder or CTabFolder

Designer seems to have an issue if you have more than one tab item and then attempt to add a new (C)TabItem to the (C)TableFolder.

Steps to reproduce:

1) Create a new Forms Composite
2) Add a (C)TabFolder
3) Add a (C)TabItem
4) Add another (C)TabItem
* Issue #1 is here - the ordering of the tab items in Designer is not properly set, the second tab item is now shown as first in the order even though the code shows it as being the second (minor)
5) Now add a anything from the Forms controls tool bar to either of the tab items
6) Select the tab item that you did not put the control on and you should get the error.

This works fine if I hand code it and even when I go back into designer, but if in designer I add an new (C)TabItem and then add a Form control to the item I get the same error.

The error appears to be with the auto-gen code:
Code: Select all
toolkit.paintBordersFor(composite);

that gets added for the Form composite that is added. If I remove this code everything works fine.
scott.klein
 
Posts: 10
Joined: Thu Sep 22, 2005 1:38 pm

Re: (C)TabFolder with multiple (C)TabItems using Forms Error

Postby Eric Clayberg » Wed Sep 28, 2005 3:54 am

scott.klein wrote:This is an issue I have just run across upon converting some GUIs to use SWT Forms. It occurs using either TabFolder or CTabFolder

Designer seems to have an issue if you have more than one tab item and then attempt to add a new (C)TabItem to the (C)TableFolder.

Steps to reproduce:

1) Create a new Forms Composite
2) Add a (C)TabFolder
3) Add a (C)TabItem
4) Add another (C)TabItem
* Issue #1 is here - the ordering of the tab items in Designer is not properly set, the second tab item is now shown as first in the order even though the code shows it as being the second (minor)

What version of SWT Designer are you using? I tried this with the current v4.1.1 build and it seemed to work fine.

scott.klein wrote:5) Now add a anything from the Forms controls tool bar to either of the tab items
6) Select the tab item that you did not put the control on and you should get the error.

I was not able to reproduce this. Give the current v4.1.1 build a try and see if it helps.

scott.klein wrote:This works fine if I hand code it and even when I go back into designer, but if in designer I add an new (C)TabItem and then add a Form control to the item I get the same error.

The error appears to be with the auto-gen code:
Code: Select all
toolkit.paintBordersFor(composite);

that gets added for the Form composite that is added. If I remove this code everything works fine.

I don't see anything in particular wrong with that line. In fact, it is required if you want borders painted around the controls within that composite.
Eric Clayberg
Software Engineering Manager
Google
http://code.google.com/webtoolkit/download.html

Author: "Eclipse Plug-ins"
http://www.qualityeclipse.com
Eric Clayberg
Moderator
 
Posts: 4503
Joined: Tue Sep 30, 2003 6:39 am
Location: Boston, MA USA

Postby scott.klein » Wed Sep 28, 2005 11:50 am

upgrading did the trick - I was on 4.1.1 of 9/18/05

gotta remember to check for updates....
scott.klein
 
Posts: 10
Joined: Thu Sep 22, 2005 1:38 pm


Return to SWT Designer

Who is online

Users browsing this forum: No registered users and 1 guest