tags:

views:

7

answers:

1

Hello,

we are using FormToolkit for some of our editors. We would like to add a button to the form header. The button should be placed by the title text. Any ideas how it could be done?

Thanks.

A: 

Got this from this link: http://www.eclipse.org/articles/article.php?file=Article-Forms33/index.html

public void createPartControl(Composite parent) {
        toolkit = new FormToolkit(parent.getDisplay());
        form = toolkit.createForm(parent);
        // form.setText("Hello, Eclipse Forms");
        toolkit.decorateFormHeading(form);
        form.setHeadClient(toolkit.createButton(form.getHead(), "This is the head client", SWT.PUSH));  // NEW LINE
}
Craig