Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Dialoge Box
Dialoge Box [message #453493] Tue, 01 August 2006 07:24 Go to next message
Eclipse UserFriend
Originally posted by: vindhyalesh.huawei.com

hi,
i have created rigt click delete action which should delete the item. i
am using the MessageDialog.openConfirmation() method to open the delete
dialogs. in this dialog on ok its working means deleting the item,but on
cancel too its deleting the item,please suggest me a solution,urgently
required.....
thanks in advance..


Regards,
Vindhyalesh
Re: Dialoge Box [message #453497 is a reply to message #453493] Tue, 01 August 2006 08:33 Go to previous messageGo to next message
Srivatsan is currently offline SrivatsanFriend
Messages: 55
Registered: July 2009
Member
Are you using switch case statements for the same?
Re: Dialoge Box [message #453498 is a reply to message #453497] Tue, 01 August 2006 08:47 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: vindhyalesh.huawei.com

no......i amm usinf jface action dialog method,openconfirmation
Re: Dialoge Box [message #453500 is a reply to message #453498] Tue, 01 August 2006 10:19 Go to previous messageGo to next message
Srivatsan is currently offline SrivatsanFriend
Messages: 55
Registered: July 2009
Member
Hey,
For the same you can try this
MessageDialog deleteDialog = new MessageDialog(shell, "Delete", null,"Are
you sure you wanna delete?",MessageDialog.QUESTION,
new String[] { "Yes", "No" }, 0);
int id = deleteDialog.open();


switch (id) {
case 0:
// Your code for deleting

case 1: // Nothing is done here.
break;
}

I'm using the same logic to throw a confirmation dialog upon window exit.
Try this. It works fine for me. Do let me know if it works.

regards,
Srivatsan
Re: Dialoge Box [message #453502 is a reply to message #453500] Tue, 01 August 2006 11:07 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: vindhyalesh.huawei.com

hi,
thanx a lot,its working for me...looking for more help in thr future as
i am new to this field.......reply please


Regards,
Vindhyalesh
Re: Dialoge Box [message #453503 is a reply to message #453502] Tue, 01 August 2006 11:32 Go to previous messageGo to next message
Srivatsan is currently offline SrivatsanFriend
Messages: 55
Registered: July 2009
Member
Sure buddy :-)
Re: Dialoge Box [message #453504 is a reply to message #453503] Tue, 01 August 2006 11:40 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: vindhyalesh.huawei.com

thankx siva
Re: Dialoge Box [message #453505 is a reply to message #453503] Tue, 01 August 2006 11:45 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: vindhyalesh.huawei.com

hi Srivatsan,
inside a view i have to provide a popup check box on a right
click action so that when one performs an action,a pop up check box should
come inside the view so that he can select some or all of the
checkboxes.......
please suggest me a solution to achieve this......its urgent
thanks in advance.....


Best regards,
Vindhyalesh
Re: Dialoge Box [message #453508 is a reply to message #453505] Tue, 01 August 2006 12:49 Go to previous messageGo to next message
Srivatsan is currently offline SrivatsanFriend
Messages: 55
Registered: July 2009
Member
Hi,
Are you talking about the right click menu with checkboxes?
if yes then this is how you do. just add the swt.check style constant to
the menu constructor
MenuItem addMenuItem = new MenuItem(menu, SWT.CHECK);

regards,
Srivatsan
Re: Dialoge Box [message #453512 is a reply to message #453508] Tue, 01 August 2006 13:05 Go to previous message
Eclipse UserFriend
Originally posted by: vindhyalesh.huawei.com

hi,
no,actually i need a popup check box inside a view which will open up
on some menu action or tool bar action etc. so that user can select some
or all the check boxes........please provide me the solution.


Regards.
Vindhyalesh
Previous Topic:Any listener notified when perspective is changed?
Next Topic:Order menus from different plugins
Goto Forum:
  


Current Time: Mon Oct 07 03:11:51 GMT 2024

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

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

Back to the top