Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[platform-swt-dev] Borders like org.eclipse.swt.widgets.Text and org.eclipse.swt.widgets.DateTime (ie. with focus in effect)

Hello,

I would like a control similar to org.eclipse.swt.widgets.DateTime, that appears as a Text field but has several sub areas.
The problème for me is the border. On Windows 7 and MacOS X for instance, widgets such as Text and DateTime have a border that change when the focus is gained.

How can I get such a border on a custom control ?

The only way I know of to get a native border is :

public class MyWidget extends Composite {

  public MyWidget(Composite parent, int style) {
  super (parent, SWT.BODER);

but that border does nothing on focus in.


I have tried looking at the code of the DateTime widget but I don't manage to see where the border is dealt with :

public class DateTime extends Composite {

  public DateTime (Composite parent, int style) {
  super (parent, checkStyle (style));


Thanks a lot in advance,

Regards,

Damien

Back to the top