Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Laying out a ListViewer
Laying out a ListViewer [message #458539] Fri, 15 July 2005 01:09 Go to next message
Eclipse UserFriend
Originally posted by: jm1.dicehome.com

I am using jFace and trying to create a window that has a ListViewer on
it with other widgets. I'd like to use the ApplicationWindowLayout which
lets me specify the location (see the usernameText field), but I can't
figure out how to put the listViewer on the window and place it with
coordinates like I do with the Text.

Thanks for your help,
Chip



public Control createContents(Composite parent) {
parent.getShell().setSize(400, 200);
parent.getShell().setLocation(300, 300);
parent.getShell().setText("Families");
parent.getShell().setLayout(new FormLayout());
Composite composite1 = new Composite(parent, SWT.NONE);

usernameText = new Text(composite1, SWT.BORDER);
usernameText.setBounds(new
org.eclipse.swt.graphics.Rectangle(100,25,150,17));
usernameText.setFocus();

ListViewer listViewer = new ListViewer(parent, SWT.SINGLE);
Re: Laying out a ListViewer [message #458550 is a reply to message #458539] Fri, 15 July 2005 18:00 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: sunil_kamath.nohotspammail.com

"cdx11356" <jm1@dicehome.com> wrote in message
news:db7281$rmp$1@news.eclipse.org...
>I am using jFace and trying to create a window that has a ListViewer on it
>with other widgets. I'd like to use the ApplicationWindowLayout which lets
>me specify the location (see the usernameText field), but I can't figure
>out how to put the listViewer on the window and place it with coordinates
>like I do with the Text.
>
A ListViewer is not a widget. You have to retrieve the underlying widget
first (getControl(), IIRC) and then set its coordinates.
---
Sunil
Re: Laying out a ListViewer [message #458589 is a reply to message #458550] Sat, 16 July 2005 02:18 Go to previous message
Eclipse UserFriend
Originally posted by: jm1.dicehome.com

Sunil,
Beautiful! Thanks a lot for your help

Chip

Sunil Kamath wrote:
> "cdx11356" <jm1@dicehome.com> wrote in message
> news:db7281$rmp$1@news.eclipse.org...
>
>>I am using jFace and trying to create a window that has a ListViewer on it
>>with other widgets. I'd like to use the ApplicationWindowLayout which lets
>>me specify the location (see the usernameText field), but I can't figure
>>out how to put the listViewer on the window and place it with coordinates
>>like I do with the Text.
>>
>
> A ListViewer is not a widget. You have to retrieve the underlying widget
> first (getControl(), IIRC) and then set its coordinates.
> ---
> Sunil
>
>
Previous Topic:Using new TreeViewer 3.1 - LabelProvider Problem
Next Topic:Bordered composite
Goto Forum:
  


Current Time: Sat Oct 24 06:11:50 GMT 2020

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

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

Back to the top