Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » TreeViewer not expanding, and Tree widget
TreeViewer not expanding, and Tree widget [message #116956] Mon, 22 December 2008 20:20 Go to next message
Tom H is currently offline Tom HFriend
Messages: 139
Registered: July 2009
Senior Member
Hi,

I have been testing with RAP and I took the TreeViewer example from the
demo site and have been making changes to it. I am having a problem where
that I want to add a Text field above my TreeViewer, so I have done the
following;

Composite contents = new Composite(parent, SWT.HORIZONTAL);
contents.setLayout(new GridLayout(1,false));
Text inputText = new Text(contents, SWT.BORDER);
inputText.setLayoutData(
new GridData(GridData.FILL_HORIZONTAL));
viewer = new TreeViewer(contents);

and the Input text expands to fill the screen, but not the TreeViewer.
However there is no method for "setLayoutData" on the Treeviewer, so I
can't expand it that way, and at the moment its crunched up on the left.

(2nd question - whats the difference between the SWT Tree widget and the
jface TreeViewer, can either be used, or one rather than the other?)

Many Thanks,

Tom
Re: TreeViewer not expanding, and Tree widget [message #116970 is a reply to message #116956] Mon, 22 December 2008 20:41 Go to previous messageGo to next message
Tom H is currently offline Tom HFriend
Messages: 139
Registered: July 2009
Senior Member
Ah, almost immediately after posting that, is discovered;

viewer.getTree().setLayoutData(new GridData(GridData.FILL_BOTH));

!!!

The question on the difference between the jface and the swt widgets still
stands though?

Tom
Re: TreeViewer not expanding, and Tree widget [message #117009 is a reply to message #116970] Tue, 23 December 2008 10:35 Go to previous messageGo to next message
Rüdiger Herrmann is currently offline Rüdiger HerrmannFriend
Messages: 581
Registered: July 2009
Senior Member
http://wiki.eclipse.org/JFace
http://wiki.eclipse.org/SWT

HTH
Rüdiger

Tom H wrote:
> Ah, almost immediately after posting that, is discovered;
>
> viewer.getTree().setLayoutData(new GridData(GridData.FILL_BOTH));
>
> !!!
>
> The question on the difference between the jface and the swt widgets
> still stands though?
>
> Tom
>
Re: TreeViewer not expanding, and Tree widget [message #117021 is a reply to message #117009] Tue, 23 December 2008 10:46 Go to previous messageGo to next message
Tom H is currently offline Tom HFriend
Messages: 139
Registered: July 2009
Senior Member
So I should be using jface toolkit objects in preference to SWT widgets
when available?
Re: TreeViewer not expanding, and Tree widget [message #117055 is a reply to message #117021] Tue, 23 December 2008 13:31 Go to previous message
Rüdiger Herrmann is currently offline Rüdiger HerrmannFriend
Messages: 581
Registered: July 2009
Senior Member
yes, in most cases you will be better off using JFace.

Tom H wrote:
>
> So I should be using jface toolkit objects in preference to SWT widgets
> when available?
>
Previous Topic:Problem with ScrolledComposite
Next Topic:updating table from server push in RAP
Goto Forum:
  


Current Time: Thu Apr 25 23:15:39 GMT 2024

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

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

Back to the top