Remove Ok / Cancel in Dialog [message #444646] |
Tue, 19 October 2004 00:47 |
Eclipse User |
|
|
|
Originally posted by: manish.garg.gmail.com
Hi,
I have a class MessageSearchDialog that overrides the
org.eclipse.jface.dialogs.Dialog. A code snippet for this class where the
view gets created is:
protected Control createDialogArea(Composite parent) {
mViewer = new MessageSearch(parent);
return mViewer.getControl();
}
The MessageSearch draws its own UI and there are my own buttons in there.
However, when I run the program there are also OK and Cancel buttons
provided by the Dialog. Is there some way to remove these buttons? I just
want my buttons.
thanks
P
|
|
|
|
Re: Remove Ok / Cancel in Dialog [message #444658 is a reply to message #444656] |
Tue, 19 October 2004 18:10 |
Eclipse User |
|
|
|
Originally posted by: manish.garg.gmail.com
Thanks Fabrizio,
The swt dialog comes with its own complexity so I want to use the jface
dialog. However, I realized it was quite easy. I guess I had not looked into
it properly.
I just over ride the createButtonsForButtonBar(Composite ...)
-P
"Fabrizio Bertocci" <fabrizio@rti.com> wrote in message
news:pan.2004.10.19.16.18.32.189771@rti.com...
> If I don't want the OK and Cancel button I usually don't use Jface, and I
> end up extending the SWT Dialog class.
> At the end Jface is a wrapper around SWT that adds more features.
> If you don't want it, don't use it... better than using and trying to find
> a workaround to the extra stuff you don't want.
>
> Fabrizio
>
>
> On Mon, 18 Oct 2004 17:47:18 -0700, Piranha wrote:
>
> > Hi,
> >
> > I have a class MessageSearchDialog that overrides the
> > org.eclipse.jface.dialogs.Dialog. A code snippet for this class where
the
> > view gets created is:
> >
> > protected Control createDialogArea(Composite parent) {
> > mViewer = new MessageSearch(parent);
> > return mViewer.getControl();
> > }
> >
> > The MessageSearch draws its own UI and there are my own buttons in
there.
> > However, when I run the program there are also OK and Cancel buttons
> > provided by the Dialog. Is there some way to remove these buttons? I
just
> > want my buttons.
> >
> > thanks
> > P
>
|
|
|
Re: Remove Ok / Cancel in Dialog [message #444661 is a reply to message #444658] |
Tue, 19 October 2004 21:38 |
Fabrizio Bertocci Messages: 10 Registered: July 2009 |
Junior Member |
|
|
Ha... that works too!
SWT's Dialog is not so bad at the end... I've been using it without too
much "pain".
Fabrizio
On Tue, 19 Oct 2004 11:10:20 -0700, Piranha wrote:
> Thanks Fabrizio,
>
> The swt dialog comes with its own complexity so I want to use the jface
> dialog. However, I realized it was quite easy. I guess I had not looked into
> it properly.
> I just over ride the createButtonsForButtonBar(Composite ...)
>
> -P
>
> "Fabrizio Bertocci" <fabrizio@rti.com> wrote in message
> news:pan.2004.10.19.16.18.32.189771@rti.com...
>> If I don't want the OK and Cancel button I usually don't use Jface, and I
>> end up extending the SWT Dialog class.
>> At the end Jface is a wrapper around SWT that adds more features.
>> If you don't want it, don't use it... better than using and trying to find
>> a workaround to the extra stuff you don't want.
>>
>> Fabrizio
>>
>>
>> On Mon, 18 Oct 2004 17:47:18 -0700, Piranha wrote:
>>
>> > Hi,
>> >
>> > I have a class MessageSearchDialog that overrides the
>> > org.eclipse.jface.dialogs.Dialog. A code snippet for this class where
> the
>> > view gets created is:
>> >
>> > protected Control createDialogArea(Composite parent) {
>> > mViewer = new MessageSearch(parent);
>> > return mViewer.getControl();
>> > }
>> >
>> > The MessageSearch draws its own UI and there are my own buttons in
> there.
>> > However, when I run the program there are also OK and Cancel buttons
>> > provided by the Dialog. Is there some way to remove these buttons? I
> just
>> > want my buttons.
>> >
>> > thanks
>> > P
>>
|
|
|
Powered by
FUDForum. Page generated in 0.03044 seconds