Here is some plain text for the text to render; this text is at http://www.eclipse.org web site.
This text is in header font and color.
This line will contain some bold and some source text. We can also add
an image.
leading blanks; more white \n\n new lines
\n more bb white .
Here is some plain text for the text to render; "); buf.append("this text is at http://www.eclipse.org web site.
"); buf.append(""); buf.append("
" + "This text is in header font and color.
"); buf.append("This line will contain some bold and "
+ "some source text. ");
buf.append("We can also add an image.
leading blanks; more white \n\n new "
+ "lines
\n more bb white .
"); buf.append("Here is some plain text for the text to render; "); buf.append("this text is at http://www.eclipse.org web site." + "
"); buf.append(""); buf.append("
"); buf.append(""); FormText formText = toolkit.createFormText(form.getBody(), true); formText.setWhitespaceNormalized(false); Button myButton = new Button(formText, SWT.FLAT); myButton.setText("Bonjour"); formText.setControl("mybutton", myButton); Table createTable = toolkit.createTable(formText, SWT.FULL_SELECTION); createTableViewer(createTable); formText.setControl("mytable", createTable); formText.setText(buf.toString(), true, false); } } Classe FormTextWithSWTControlPart.java du projet eclipseformsexample Construction des deux objets Control dont le parent est FormText FormText ne gère pas la destruction des objets Control (dispose) Dans le contenu texte, liaison avec deux objets Control