Home » Eclipse Projects » JFace » JFace Layout Mystery - What am I doing wrong?
JFace Layout Mystery - What am I doing wrong? [message #1719177] |
Tue, 05 January 2016 21:01 |
Jim Boone Messages: 15 Registered: August 2015 Location: North Carolina |
Junior Member |
|
|
Hi,
I am using the following code to create a property tabbed propertysheet page. My desire is for the tabbed folder to grab the excess horizontal and vertical space properly. However, as you can see, the text continues off the screen even though the containing widget is told to wrap. Does anyone have a clue what I am doing wrong? I am stumped. Thanks in advance!
--Jim
@PostConstruct
@Override
public void createControls(Composite parent, TabbedPropertySheetPage tabbedPropertySheetPage) {
parent.setLayout(new GridLayout(1, false));
parent.setLayoutData(new GridData(SWT.FILL, SWT.FILL, false, true, 1, 1));
ScrolledForm scrldfrmNewScrolledform = formToolkit.createScrolledForm(parent);
//Form scrldfrmNewScrolledform = formToolkit.createForm(parent);
scrldfrmNewScrolledform.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));
formToolkit.paintBordersFor(scrldfrmNewScrolledform);
scrldfrmNewScrolledform.getBody().setLayout(new GridLayout(1, false));
tabFolder = new CTabFolder(scrldfrmNewScrolledform.getBody(), SWT.BORDER);
tabFolder.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));
tabFolder.setTabPosition(SWT.BOTTOM);
formToolkit.adapt(tabFolder);
formToolkit.paintBordersFor(tabFolder);
tabFolder.setSelectionBackground(
Display.getCurrent().getSystemColor(SWT.COLOR_TITLE_INACTIVE_BACKGROUND_GRADIENT));
tbtmDocumentation = new CTabItem(tabFolder, SWT.NONE);
tbtmDocumentation.setText("Documentation");
Composite docComposite = formToolkit.createComposite(tabFolder, SWT.NONE);
tbtmDocumentation.setControl(docComposite);
formToolkit.paintBordersFor(docComposite);
docComposite.setLayout(new GridLayout(1, false));
styledDocumentationText = new StyledText(docComposite, SWT.WRAP);
styledDocumentationText.setAlwaysShowScrollBars(false);
styledDocumentationText.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));
formToolkit.adapt(styledDocumentationText);
formToolkit.paintBordersFor(styledDocumentationText);
tbtmAppInfo = new CTabItem(tabFolder, SWT.NONE);
tbtmAppInfo.setText("Application Info");
Composite appComposite = formToolkit.createComposite(tabFolder, SWT.NONE);
tbtmAppInfo.setControl(appComposite);
formToolkit.paintBordersFor(appComposite);
appComposite.setLayout(new GridLayout(1, false));
styledAppInfoText = new StyledText(appComposite, SWT.WRAP);
styledAppInfoText.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));
styledAppInfoText.setAlwaysShowScrollBars(false);
formToolkit.adapt(styledAppInfoText);
formToolkit.paintBordersFor(styledAppInfoText);
super.createControls(parent, tabbedPropertySheetPage);
|
|
| |
Goto Forum:
Current Time: Mon Sep 23 21:23:25 GMT 2024
Powered by FUDForum. Page generated in 0.03684 seconds
|