Non-Modal JFace Dialog?

一曲冷凌霜 提交于 2019-12-19 05:30:15

问题


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


回答1:


Using

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

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




回答2:


@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..



来源:https://stackoverflow.com/questions/5796535/non-modal-jface-dialog

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!