[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
|
[news.eclipse.platform.swt] thanks, it works !
|
Thanks all for your help, now it works perfectly!!
anthony
Horváth, Csaba wrote:
> Hi,
> The following code works for me:
> public void createPartControl(Composite parent)
> {
> parent.setLayout(new FillLayout());
> ScrolledComposite sc1 = new ScrolledComposite(parent,SWT.H_SCROLL |
> SWT.V_SCROLL | SWT.BORDER);
> Composite comp = new Composite(sc1, SWT.NONE);
> comp.setLayout(new FillLayout());
> new Label(comp, SWT.NONE).setText("text");
> new Button(comp, SWT.NONE).setText("button");
> sc1.setContent(comp);
> comp.setSize(comp.computeSize(SWT.DEFAULT, SWT.DEFAULT));
> }
> It displays both the label and the text.
> HTH,
> Regards,
> Csaba