Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » a problem about Formpage
a problem about Formpage [message #445928] Fri, 12 November 2004 11:30
Eclipse UserFriend
Originally posted by:

hi,i meet a problem when i use a formpage,first i create a page extend
from the frompage,then on the page create a sashForm, next create two
children section on the sashForm.each section only have a multi line text.
in this page i want when the page is resized,only the text have scolled
bar,and the page don't have.but i failed when i try to implement it.
could anybody help me?
the following are my code:

protected void createFormContent(IManagedForm managedForm) {
ScrolledForm form = managedForm.getForm();
FormToolkit toolkit = managedForm.getToolkit();
GridLayout layout = new GridLayout();
layout.marginWidth = 4;
layout.marginHeight = 4;
sashForm = new SashForm(form.getBody(), SWT.FLAT );
toolkit.adapt(sashForm, false, false);
sashForm.setLayoutData(new GridData(GridData.FILL_BOTH));
createRequestPart(managedForm, sashForm);
createResponcePart(managedForm, sashForm);
form.setText("SOAPMessage Page"); //$NON-NLS-1$
private void createRequestPart(IManagedForm managedForm, SashForm
parent) {
FormToolkit toolkit = managedForm.getToolkit();
Section section = createStaticSection(parent, toolkit);
section.setText("SOAP Request");
Composite client = toolkit.createComposite(section, SWT.WRAP);
GridLayout layout = new GridLayout();
layout.marginWidth = 3;
layout.marginHeight = 4;
request = toolkit.createText(client, "", SWT.MULTI | SWT.WRAP );
request.setSize(100, 200);
//request.setText(" test\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n ");
final SectionPart spart = new SectionPart(section);

Previous Topic:URL link in a text field.
Next Topic:Eclipse always makes a full rebuild after saving a file
Goto Forum:

Current Time: Tue Oct 20 12:18:52 GMT 2020

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

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

Back to the top