Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Remove Ok / Cancel in Dialog
Remove Ok / Cancel in Dialog [message #444646] Tue, 19 October 2004 00:47 Go to next message
Eclipse UserFriend
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 #444656 is a reply to message #444646] Tue, 19 October 2004 16:18 Go to previous messageGo to next message
Fabrizio Bertocci is currently offline Fabrizio BertocciFriend
Messages: 10
Registered: July 2009
Junior Member
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 #444658 is a reply to message #444656] Tue, 19 October 2004 18:10 Go to previous messageGo to next message
Eclipse UserFriend
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 Go to previous message
Fabrizio Bertocci is currently offline Fabrizio BertocciFriend
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
>>
Previous Topic:Button with image & text - Is it possible??
Next Topic:Focus problem on Mac
Goto Forum:
  


Current Time: Wed Nov 25 13:48:28 GMT 2020

Powered by FUDForum. Page generated in 0.01808 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top