[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.platform] Adding Scrollable on Group Page

Hi,

I am adding a WizardPage on a Wizard. public clas tempWizard{
public void addPages() {
try {
mainPage = new TempPage(workbench, selection);
super.addPage(mainPage);
} catch (Throwable e) {
}
}
}
public class TempPage {


public void createControl(Composite parent) {
		Composite composite = new Composite(parent, SWT.None);

composite.setLayout(new GridLayout());
composite.setLayoutData(new GridData(GridData.VERTICAL_ALIGN_FILL
| GridData.HORIZONTAL_ALIGN_FILL));
composite.setFont(parent.getFont());
setControl(composite);
Group group = new Group(composite, SWT.None);
group.setLayout(new GridLayout());
group.setText("Buttons"); //$NON-NLS-1$
group.setLayoutData(new GridData(GridData.GRAB_HORIZONTAL
| GridData.HORIZONTAL_ALIGN_FILL)); for (int count = 0; count < 100; count++) {
Button sectionCheckbox = new Button(group, SWT.CHECK);
arrayList.add(sectionCheckbox);
sectionCheckbox.setText("Button"); //$NON-NLS-1$
sectionCheckbox.setSelection(false);
sectionCheckbox.addListener(SWT.Selection, this);
}
}
}


As u see i m adding some 100 buttons onto the page. My requireement is to set some predefined height for the WizardPage or Wizard and if buttons exceed the same to display a scrollbar so taht all the buttons can be seen.
Can anyone please suggest any way to achieve the same.? Thanking in advance,


Regards,