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: anance.263.net

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?
thx
the following are my code:

protected void createFormContent(IManagedForm managedForm) {
super.createFormContent(managedForm);
ScrolledForm form = managedForm.getForm();
FormToolkit toolkit = managedForm.getToolkit();
GridLayout layout = new GridLayout();
layout.marginWidth = 4;
layout.marginHeight = 4;
form.getBody().setLayout(layout);
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);
createToolBarActions(managedForm);
form.setText("SOAPMessage Page"); //$NON-NLS-1$
form.updateToolBar();
managedForm.refresh();
}
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;
client.setLayout(layout);
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 ");
request.setEditable(false);
toolkit.paintBordersFor(client);
section.setClient(client);
final SectionPart spart = new SectionPart(section);
managedForm.addPart(spart);

}
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 Apr 23 09:01:59 GMT 2024

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

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

Back to the top