User Tools

Site Tools



This shows you the differences between two versions of the page.

Link to this comparison view

eclipse_forms_combobox [2014/02/03 10:09] (current)
mihael created
Line 1: Line 1:
 +====== Combobox in Eclipse Forms ======
 +Eclipse Forms is a framework for displaying widgets in a more website like style. It also has some convenient ways for creating these widget instances. You just need to create a ''​FormToolkit''​ instance and call the ''​create''​ methods.
 +  FormToolkit toolkit = new FormToolkit(page.getDisplay());​
 +  Form form = toolkit.createForm(page);​
 +  ​
 +  toolkit.createText(form.getBody(),​ SWT.BORDER);​
 +  ​
 +But some widgets are not out-of-the-box supported by the ''​FormToolkit''​ class. You can then create the widget by hand and use some toolkit methods to adjust the painting of the widget.
 +  Control c = new MyControl(form.getBody());​
 +  toolkit.adapt(c);​
 +  toolkit.paintBordersFor(c);​
 +===== Combobox =====
 +In case of the combobox which is not out-of-the-box supported by the ''​FormToolkit''​ class you can use the ''​CCombo''​ widget.
 +  CCombo combobox = new CCombo(form.getBody(),​ SWT.FLAT | SWT.BORDER);​
 +{{tag>​swt eclipse devel}}
eclipse_forms_combobox.txt ยท Last modified: 2014/02/03 10:09 by mihael