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

Syed,

This is probably not possible.  Styles like MIN, MAX and CLOSE are hints
which window managers may or may not honour precisely.  Try running the
SWT Control Example, go to the Shell tab, and choose different style
combinations to see what behaviour actually results.

Grant

Syed Rizvi wrote:

> Thanks for the info.I used the following method.But the problem is that
> now I am getting all three button(minimize,maximize and close) I just want
> minimize and close button any idea how to get that.

> private int shellstyle = (SWT.MIN);

> protected void setShellStyle(int newShellStyle) {
>   shellstyle = newShellStyle;
> }

> Thanks

> Syed



> Dave wrote:

> > Oh, ok, if you are using the Dialog class try overriding the
getShellStyle()
> > method. That will let you specify the styles.

> > ex:

> > public int getShellStyle() {
> >     return ( SWT.DIALOG_TRIM | SWT.MIN ) ;
> > }

> > Thanks
> > Dave


> > "Syed Rizvi" <sma_r@xxxxxxxxxxx> wrote in message
> > news:b7p1ji$18n$1@xxxxxxxxxxxxxxxx
> > > I found that out in the mail archive but the problem is that my
> > > MessaegDilaog is already created and I couldn't find any method that is
> > > creating shell(Shell shell = new Shell()) in MessageDialog.So either I
> > > have to re writethe Dialog class and use or something like it
> > >
> > > Thanks
> > >
> > >
> > > Syed
> > >
> > > Dave wrote:
> > >
> > > > You could use the style SWT.DIALOG_TRIM along with the SWT.MIN style.
> > >
> > > > ex.:  new Shell ( myParentShell, SWT.DIALOG_TRIM | SWT.MIN ) ;
> > >
> > >
> > > > Thanks
> > > > Dave
> > >
> > >
> > > > "Syed Rizvi" <sma_r@xxxxxxxxxxx> wrote in message
> > > > news:b7osgf$t9d$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.
> > > > > I would appreciate any help.
> > > > >
> > > > > Syed
> > > > >
> > > > >
> > > > >
> > > > >
> > >
> > >
> > >
> > >
> > >