ScrolledPageBook example [message #447989] |
Wed, 22 December 2004 17:55 |
Eclipse User |
|
|
|
Originally posted by: tschlat.gmx.de
Hi,
could someone please provide me with an example of how to use the
ScrolledPageBook form widget?
Ciao, Thorsten
I tried this but there is nothing on the page:
...
FormToolkit toolkit = managedForm.getToolkit();
form.setText("Form with subpages");
GridLayout layout = new GridLayout();
layout.marginWidth = 10;
form.getBody().setLayout(layout);
ScrolledPageBook pageBook = toolkit.createPageBook(form.getBody(),
SWT.FLAT|SWT.TOP);
Composite page1 = pageBook.createPage("page1");
Text text1 = toolkit.createText(page1, "page1",SWT.MULTI|SWT.WRAP);
page1.setLayout(new GridLayout());
text1.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
GridData gd = new GridData(GridData.FILL_HORIZONTAL);
gd.heightHint = 0;
pageBook.setLayoutData(gd);
....
|
|
|
Re: ScrolledPageBook example [message #447990 is a reply to message #447989] |
Wed, 22 December 2004 19:02 |
Eclipse User |
|
|
|
Originally posted by: tschlat.gmx.de
eh.... I simply forgot the pageBook.showPage()
tschlat wrote:
> Hi,
> could someone please provide me with an example of how to use the
> ScrolledPageBook form widget?
> Ciao, Thorsten
> I tried this but there is nothing on the page:
> ...
> FormToolkit toolkit = managedForm.getToolkit();
> form.setText("Form with subpages");
> GridLayout layout = new GridLayout();
> layout.marginWidth = 10;
> form.getBody().setLayout(layout);
> ScrolledPageBook pageBook = toolkit.createPageBook(form.getBody(),
> SWT.FLAT|SWT.TOP);
> Composite page1 = pageBook.createPage("page1");
> Text text1 = toolkit.createText(page1, "page1",SWT.MULTI|SWT.WRAP);
> page1.setLayout(new GridLayout());
> text1.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
> GridData gd = new GridData(GridData.FILL_HORIZONTAL);
> gd.heightHint = 0;
> pageBook.setLayoutData(gd);
> ....
|
|
|
Re: ScrolledPageBook example [message #447991 is a reply to message #447989] |
Wed, 22 December 2004 19:03 |
Eclipse User |
|
|
|
Originally posted by: tschlat.gmx.de
eh.... I simply forgot the pageBook.showPage()
tschlat wrote:
> Hi,
> could someone please provide me with an example of how to use the
> ScrolledPageBook form widget?
> Ciao, Thorsten
> I tried this but there is nothing on the page:
> ...
> FormToolkit toolkit = managedForm.getToolkit();
> form.setText("Form with subpages");
> GridLayout layout = new GridLayout();
> layout.marginWidth = 10;
> form.getBody().setLayout(layout);
> ScrolledPageBook pageBook = toolkit.createPageBook(form.getBody(),
> SWT.FLAT|SWT.TOP);
> Composite page1 = pageBook.createPage("page1");
> Text text1 = toolkit.createText(page1, "page1",SWT.MULTI|SWT.WRAP);
> page1.setLayout(new GridLayout());
> text1.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
> GridData gd = new GridData(GridData.FILL_HORIZONTAL);
> gd.heightHint = 0;
> pageBook.setLayoutData(gd);
> ....
|
|
|
Powered by
FUDForum. Page generated in 0.02949 seconds