|
Re: ViewForm Issue [message #464389 is a reply to message #464341] |
Tue, 22 November 2005 18:11 |
Veronika Irvine Messages: 1272 Registered: July 2009 |
Senior Member |
|
|
The following works for me:
public static void main (String [] args) {
Display display = new Display ();
Shell shell = new Shell (display);
shell.setLayout(new FillLayout());
ViewForm vf = new ViewForm(shell, SWT.BORDER);
Composite c1 = new Composite(vf, SWT.NONE);
c1.setLayout(new RowLayout());
Label l = new Label(c1, SWT.BORDER);
l.setText("label 1");
l = new Label(c1, SWT.BORDER);
l.setText("label 2");
vf.setTopLeft(c1);
l = new Label(vf, SWT.BORDER);
l.setText("Content");
vf.setContent(l);
shell.open ();
while (!shell.isDisposed ()) {
if (!display.readAndDispatch ()) display.sleep ();
}
display.dispose ();
}
"zinc" <zincsterio@yahoo.com> wrote in message
news:df42ef3e3eb7b8c58d941c9c8ae2630d$1@www.eclipse.org...
> Hi,
> Sorry for the barrage of questions, but I've gotten a lot of great help
> here.
>
> But for a ViewForm, I am having some problems. Can you set a Composite to
> the
> setTopLeft(Control c) method? I am interested in setting a few Labels in
> a Composite, and setting that to the TopLeft of the ViewForm as a sort of
> Header, but the composite is not visible when I set it. Is this something
> to do with the ViewForm or is it some subtlety with the Composite?
>
> Thanks.
>
|
|
|
Powered by
FUDForum. Page generated in 0.03389 seconds