[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[news.eclipse.tools] Re: How to add a Minimize button for a MessageDialog

Yes, the maximize button is visible but disabled. Presumably Windows can't hide the maximize button when there is a minimize button.
You can enter a bug against SWT to find out for sure.
I'm not sure what your code snippet would do.
You should do something like:

 public class MinimizableDialog extends Dialog {
  MinimizableDialog(Shell shell) {
   super(shell);
   setShellStyle(getShellStyle() | SWT.MIN);
  }
 }


"Syed Rizvi" <sma_r@xxxxxxxxxxx> wrote in message news:b7qnlh$2o1$1@xxxxxxxxxxxxxxxx
> I used the following method and got the result but now I am getting all
> three buttons(MIN,MAX,CLOSE) I need just MIN,CLOSE.
>
> private int shellstyle = (SWT.MIN);
>
> protected void setShellStyle(int newShellStyle) {
>   shellstyle = newShellStyle;
> }
>
> Thanks
>
> Syed
>
>
> Knut Radloff wrote:
>
> > "Syed Rizvi" <sma_r@xxxxxxxxxxx> wrote in message
> news:b7mpfg$jtc$1@xxxxxxxxxxxxxxxx
> > > Hi all,
> > >
> > > I like to know how can I add a minimize button to a MesasgeDialog.I have
> > > searched the archives and found out that createShell has the method
> > > setShellStyle but I am not sure if that is what I should use for this.
>
> > setShellStyle is it but you don't need to override the createShell method.
> > Just subclass from MessageDialog and set the shell styles in the
> constructor. Searching for senders of setShellStyle will show some
> > examples. For instance ResizableDialog.
>
> > Knut
>
>
>
>
>