MessageBox [message #465323] |
Fri, 09 December 2005 05:31 |
Eclipse User |
|
|
|
Originally posted by: osipov.appliedtech.ru
Hi, everybody!
How do I initially set default button in org.eclipse.swt.widgets.MessageBox
to something else apart from SWT.YES?
thanks a lot in advance.
|
|
|
|
Re: MessageBox [message #465379 is a reply to message #465352] |
Mon, 12 December 2005 05:01 |
Eclipse User |
|
|
|
Originally posted by: osipov.appliedtech.ru
Veronika, thanks a lot for your reply.
That is what I do
MessageBox box = new MessageBox(getView().getViewSite().getShell(),
SWT.YES | SWT.NO | SWT.ICON_QUESTION);
when I open this box SWT.YES is a default button, that is if I press enter
YES-button will be selected, but I need NO to be selected by default.
I mean, I did the way you advised me to, but it did not help.
> Create with the right style bits
>
> e.g.
> SWT.OK | SWT.CANCEL
> SWT.YES | SWT.NO
> SWT.RETRY | SWT.ABORT | SWT.IGNORE
>
>
>
> "Peter Osipov" <osipov@appliedtech.ru> wrote in message
> news:dnb4rt$3ua$1@news.eclipse.org...
> > Hi, everybody!
> > How do I initially set default button in
> > org.eclipse.swt.widgets.MessageBox
> > to something else apart from SWT.YES?
> > thanks a lot in advance.
> >
> >
>
>
|
|
|
|
|
Re: MessageBox [message #465405 is a reply to message #465391] |
Mon, 12 December 2005 19:18 |
Eclipse User |
|
|
|
Originally posted by: mwilli.iastate.edu
Perhaps this is something you can request for a future version.
Something like:
MessageBox box = new MessageBox(getView().getViewSite().getShell(),
SWT.YES | SWT.NO | SWT.ICON_QUESTION);
box.setDefaultButton(SWT.NO);
It wouldn't be a difficult implementation since a Shell already has the
capability.
Mike
Veronika Irvine wrote:
> I guess I misunderstood your question.
>
> No, there is no way to change the default button in MessageBox.
>
> "Peter Osipov" <osipov@appliedtech.ru> wrote in message
> news:dnj086$7l7$1@news.eclipse.org...
>> Veronika, thanks a lot for your reply.
>> That is what I do
>> MessageBox box = new MessageBox(getView().getViewSite().getShell(),
>> SWT.YES | SWT.NO | SWT.ICON_QUESTION);
>> when I open this box SWT.YES is a default button, that is if I press enter
>> YES-button will be selected, but I need NO to be selected by default.
>> I mean, I did the way you advised me to, but it did not help.
>>
>>> Create with the right style bits
>>>
>>> e.g.
>>> SWT.OK | SWT.CANCEL
>>> SWT.YES | SWT.NO
>>> SWT.RETRY | SWT.ABORT | SWT.IGNORE
>>>
>>>
>>>
>>> "Peter Osipov" <osipov@appliedtech.ru> wrote in message
>>> news:dnb4rt$3ua$1@news.eclipse.org...
>>>> Hi, everybody!
>>>> How do I initially set default button in
>>>> org.eclipse.swt.widgets.MessageBox
>>>> to something else apart from SWT.YES?
>>>> thanks a lot in advance.
>>>>
>>>>
>>>
>>
>>
>
>
|
|
|
Re: MessageBox [message #465427 is a reply to message #465400] |
Tue, 13 December 2005 05:49 |
Eclipse User |
|
|
|
Originally posted by: osipov.appliedtech.ru
Anyway, thanks a lot guys!
What if I inherit my own message box from the existing one and add just one
method. Will that do?
|
|
|
|
|
Re: MessageBox [message #465453 is a reply to message #465444] |
Wed, 14 December 2005 04:41 |
Eclipse User |
|
|
|
Originally posted by: osipov.appliedtech.ru
Oh, right. What a pity. Anyway, Veronika, thanks a lot for your support.
> You will not be able to get a handle to the buttons in any platform
> independant way. MessageBox is not intended to be subclassed.
>
> "Peter Osipov" <osipov@appliedtech.ru> wrote in message
> news:dnlnds$q4q$1@news.eclipse.org...
> > Anyway, thanks a lot guys!
> > What if I inherit my own message box from the existing one and add just
> > one
> > method. Will that do?
> >
> >
> >
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.02997 seconds