Tab folder with form section - expand section with title problem [message #632191] |
Tue, 12 October 2010 00:53  |
Eclipse User |
|
|
|
Hi,
I've got a problem with a tab folder and form with section on it.
Expand event doesn't work by pressing title of section.
To reproduce:
1. Create sample project with a view.
2. Change method createPartControl
public void createPartControl(Composite parent) {
final FormToolkit toolkit = new FormToolkit(parent.getDisplay());
parent.setLayout(new FillLayout());
TabFolder folder = new TabFolder(parent, SWT.BOTTOM);
TabItem tabItem = new TabItem(folder, SWT.NONE);
tabItem.setText("OBJECT");
Composite composite = new Composite(folder, SWT.NONE);
tabItem.setControl(composite);
composite.setLayout(new GridLayout());
composite.setLayoutData(new GridData(GridData.FILL_BOTH));
ScrolledForm form = toolkit.createScrolledForm(composite);
toolkit.decorateFormHeading(form.getForm());
toolkit.getHyperlinkGroup().setHyperlinkUnderlineMode(HyperlinkSettings.UNDERLINE_HOVER);
GridData layoutData = new GridData(GridData.FILL_BOTH);
form.setLayoutData(layoutData);
form.getBody().setLayout(new GridLayout());
Section section = toolkit.createSection(form.getBody(), ExpandableComposite.TITLE_BAR | ExpandableComposite.TWISTIE
| ExpandableComposite.EXPANDED);
section.setText("Section name");
section.setDescription(section.getText());
section.setLayoutData(layoutData);
Composite bComposite = toolkit.createComposite(section);
bComposite.setLayout(new GridLayout(2, true));
GridData gd = new GridData(GridData.FILL_BOTH);
bComposite.setLayoutData(gd);
section.setClient(bComposite);
}
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.23847 seconds