[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[news.eclipse.platform.swt] Re: "Flat" widgets

Geoff Gibbs wrote:
How do I get my widgets to appear 'flat' like the ones used in eclipse?

I've tried using the FormWidgetFactory but I don't really know how.

I've worked it out. For anyone else who wants to know:

If you tell FormWidgetFactory to paint the borders for a Composite, it will paint the borders of all of the composites children.
For example:
FormWidgetFactory fwf = new FormWidgetFactory();
Composite page = new Composite(parent, SWT.NONE);
fwf.paintBordersFor(page);


  new Text(page, SWT.NONE);

The Text widget will be painted with a solid black border.
Note: If the Text widget is created with SWT.BORDER then two borders will be drawn.



Geoff