Laying out a ListViewer [message #458539] |
Thu, 14 July 2005 21:09  |
Eclipse User |
|
|
|
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 #458589 is a reply to message #458550] |
Fri, 15 July 2005 22:18  |
Eclipse User |
|
|
|
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
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.02853 seconds