Robben_Ford_Fan_boy
Robben_Ford_Fan_boy

Reputation: 8720

How to draw border around Canvas in SWT

Is it possible to have a Canvas with a border around it? Passing SWT.BORDER_SOLID to the Canvas constructor does nothing:

imageCanvas = new Canvas(top, SWT.V_SCROLL | SWT.H_SCROLL | SWT.NO_REDRAW_RESIZE | SWT.DOUBLE_BUFFERED | SWT.BORDER_SOLID);

Upvotes: 0

Views: 239

Answers (1)

Baz
Baz

Reputation: 36884

SWT.BORDER will do the trick.

The Javadoc of SWT.BORDER_SOLID states that it's:

Used By: TextStyle

Upvotes: 3

Related Questions