Hi all,

I'm not all too familiar with the use of SWT. My code at the moment creates a tab which contains a Canavs:

Display display = new Display();
Shell shell = new Shell(display);

TabFolder tabFolder = new TabFolder(shell, SWT.BORDER);
TabItem tabItem = new TabItem(tabFolder, SWT.NULL);
Canvas c = new Canvas(tabFolder, SWT.BORDER);

tabItem.setControl(c)

I wish to make this Canvas scrollable, through googling i found that the easiest way to do this is to create a ScrolledComposite with a canvas inside, which i can get to work, as follows, if i leave out the tab:

Display display = new Display();
Shell shell = new Shell(display);

ScrolledComposite c1 = new ScrolledComposite(shell, SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL);
Canvas c = new Canvas(c1, SWT.BORDER);

c1.setContent(c);

The problem i am facing is when i try to implent the tab, as follows, i cannot get the ScrollableComposite to work. I do this by changing the parent of the ScrollableComposite to the TabFolder:

Display display = new Display();
Shell shell = new Shell(display);

TabFolder tabFolder = new TabFolder(shell, SWT.BORDER);
TabItem tabItem = new TabItem(tabFolder, SWT.NULL);

ScrolledComposite c1 = new ScrolledComposite(tabFolder, SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL);
Canvas c = new Canvas(c1, SWT.BORDER);

c1.setContent(c);
tabItem.setControl(c1);

Am i doing something obviously wrong, or is the solution to this a little more complex than i think?

I hope i've provided enough information, if not please let me know.

Hope you can help :)

Gary