Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » ScrolledPageBook example
ScrolledPageBook example [message #447989] Wed, 22 December 2004 17:55 Go to next message
Eclipse UserFriend
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 Go to previous messageGo to next message
Eclipse UserFriend
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 Go to previous message
Eclipse UserFriend
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);

> ....
Previous Topic:Unable to run "Snippet1" from the swt website
Next Topic:Layout problem using CTabFolder in a form
Goto Forum:
  


Current Time: Fri Oct 23 01:21:12 GMT 2020

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

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

Back to the top