【发布时间】:2014-08-25 11:24:13
【问题描述】:
我有一个扩展org.eclipse.jface.dialogs.Dialog 类的类。我创建了一个自定义对话框,因此需要删除其默认的 OK 取消按钮,为此我重写了一个超类方法来执行此操作,如下所示。
protected Button createButton(Composite arg0, int arg1, String arg2, boolean arg3)
{
//Retrun null so that no default buttons like 'OK' and 'Cancel' will be created
return null;
}
一切都很好,现在我观察到在删除 OK 取消按钮后,shell 中会留下一个默认区域。
我尝试了很多但没有被删除,我所做的所有更改都反映了这一点。 所以请告诉我出了什么问题。
【问题讨论】: