Non-Modal JFace Dialog?

2019-02-16 12:42发布

Simply put: Is there any way to create non-modal JFace dialog? I've tried calling setShellStyle to no avail. If I remember right this isn't a problem in swing - is this a shortcoming of SWT, or am I just misusing the widget?

TIA

标签: java swt jface
2条回答
Juvenile、少年°
2楼-- · 2019-02-16 13:10

Using

setShellStyle(SWT.CLOSE | SWT.MODELESS | SWT.BORDER | SWT.TITLE);
setBlockOnOpen(false);

seems to be the practice. This doesn't work for you?

查看更多
戒情不戒烟
3楼-- · 2019-02-16 13:11
@Override
protected void setShellStyle(int newShellStyle) {           
    super.setShellStyle(SWT.CLOSE | SWT.MODELESS| SWT.BORDER | SWT.TITLE);
    setBlockOnOpen(false);
}

The above code will solve the problem..

查看更多
登录 后发表回答