Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » problem with forms
problem with forms [message #464496] Wed, 23 November 2005 13:59
Carmelo  is currently offline Carmelo
Messages: 224
Registered: July 2009
Senior Member
Hi all
hope this is the right forum to talk about that ....

i'm having problem with my example using forms ...
here is a little example ...

if you try the little bit it looks working fine ...
now if you remove from the stringbuffer all the "here" word (leave just one)
you can see that the size of the section has big enough to keep paint the
"create" word.
the description information (ie: Creates a command) will be splitted in two
rows :-(

i'm a doing something wrong?
i have tried even to use section .setLayoutData(new
TableWrapData(TableWrapData.FILL));

force in the main container a grid layout with fill both property ... but
still no luck ?

Ciao
Kar




Section section = toolkit.createSection(form.getBody(), Section.DESCRIPTION
|
Section.TITLE_BAR | Section.EXPANDED);
section.setText("create");
toolkit.createCompositeSeparator(section);
section.setDescription("Creates a command.");

StringBuffer buf = new StringBuffer();
buf.append("<form>");
buf.append("<p>");
buf.append("Here Here Here Here Here Here Here Here Here Here Here ");

buf.append("</p>");
buf.append("</form>");

FormText rtext = toolkit.createFormText(section, true);
rtext.setFont("header", JFaceResources.getHeaderFont());
rtext.setText(buf.toString(), true, false);
rtext.addHyperlinkListener(new HyperlinkAdapter() {
public void linkActivated(HyperlinkEvent e) {
System.out.println("Link active: "+e.getHref());
}
});

section.setClient(rtext);
Previous Topic:Java2D with SWT
Next Topic:Open file dialog
Goto Forum:
  


Current Time: Sun Oct 26 05:22:46 GMT 2014

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

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