Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Size of TreeViewer within form Section
Size of TreeViewer within form Section [message #410001] Tue, 15 February 2005 18:21 Go to next message
Ed Snible is currently offline Ed Snible
Messages: 34
Registered: July 2009
Member
How can I specify the minimum size for a TreeViewer within a form's
ExpandableComposite Section?

I'd like to say "TreeViewer shall be at least 12 lines high".
Re: Size of TreeViewer within form Section [message #412130 is a reply to message #410001] Tue, 22 February 2005 18:16 Go to previous message
Michael Scott is currently offline Michael Scott
Messages: 7
Registered: July 2009
Junior Member
Ed,

I found that in a dialog box I had to configure the grid data and use it to
set the underlying tree layout data. This was done for me automatically when
using the same TreeViewer from within a view.

protected Control createDialogArea(Composite parent) {
Composite area = (Composite) super.createDialogArea(parent);
area.setBounds(0, 0, 800, 800);
GridData data = new GridData(GridData.FILL_BOTH);
data.widthHint = convertWidthInCharsToPixels(60);
data.heightHint = convertHeightInCharsToPixels(18);
final TreeViewer viewer = new TreeViewer(area, SWT.MULTI | SWT.H_SCROLL
| SWT.V_SCROLL);
viewer.setContentProvider(new ViewContentProvider());
viewer.setLabelProvider(new ViewLabelProvider());
viewer.setInput(area);
viewer.setAutoExpandLevel(2);
viewer.expandToLevel(2);
Tree treeWidget = viewer.getTree();
treeWidget.setLayoutData(data);
treeWidget.setFont(area.getFont());
return (area);
}

"Ed Snible" <esnible@acm.org> wrote in message
news:cutejr$62v$1@www.eclipse.org...
> How can I specify the minimum size for a TreeViewer within a form's
> ExpandableComposite Section?
>
> I'd like to say "TreeViewer shall be at least 12 lines high".
>
>
Previous Topic:Caveats for developing RCP + plugin
Next Topic:Implementing command line interface to build project
Goto Forum:
  


Current Time: Wed Oct 01 18:35:43 GMT 2014

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

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