我正在尝试创建一个弹出式窗口,这是绝对没有修剪。
我尝试了以下方法,但得到了一个带有非常细的黑色边框的窗口。我的目标是完全没有可见的边框。
public class PopupWithArrow extends PopupDialog
{
public PopupWithArrow(Shell shell)
{
super(shell, SWT.NO_TRIM | SWT.MODELESS | SWT.NO_FOCUS,
false, false, false, false, false, null, null);
}
}发布于 2017-09-18 21:01:49
我使用Windows调用重新定义了窗口的样式,并得到了我想要的结果。
public class PopupWithArrow extends PopupDialog
{
public PopupWithArrow(Shell shell)
{
super(shell, SWT.NO_TRIM | SWT.MODELESS | SWT.NO_FOCUS,
false, false, false, false, false, null, null);
}
@Override
public void create()
{
super.create();
restyle();
}
public void restyle()
{
OS.SetWindowLongPtr(getShell().handle, OS.GWL_STYLE, OS.WS_POPUP);
}
}https://stackoverflow.com/questions/46277713
复制相似问题