[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[news.eclipse.tools] Re: How to set the title of the MessageBox?

I don't know how to set the title of the MessageBox. But you can accomplish
your task using a MessageDialog. It has methods to create title, text etc.
The only problem u might encounter is messageDialog has ok and cancel
buttons by default. If you need only a "Close" button instead of ok and
cancel buttons, u should do the following.
protected void createButtonsForButtonBar(Composite parent)

{

createButton(parent, IDialogConstants.OK_ID, "Close", true) ;

}

HTH

Balaji



"slam" <jsk_lam@xxxxxxxxxxx> wrote in message
news:b2e28b$aam$1@xxxxxxxxxxxxxxxx
> I have tried the following and it does not work:
>
> MessageBox msgBox = new MessageBox(...);
> msgBox.getParent().setText("My Title");
>
> Thanks
> slam
>