Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » How enable and disable buttons using event in SWT.(How enable and disable buttons using event in SWT.)
How enable and disable buttons using event in SWT. [message #1006654] Fri, 01 February 2013 05:39 Go to next message
sumit singh is currently offline sumit singh
Messages: 131
Registered: October 2012
Location: Bangalore
Senior Member

I'm creating one swt project . In that i have 1 dialog with 4 buttons.
What i need:
With one Button which is enable if i click then other will enable and this will disable.
And again from other button if i click all other should disable and 1st one should enable.

How I'm doing
Simple way to do this is create one function which invert the visibility. and call that method from widget Selection event.

What i want
Is there is any other way (Standard) to do this like using fireevent.


Thanks
Re: How enable and disable buttons using event in SWT. [message #1006844 is a reply to message #1006654] Sat, 02 February 2013 14:23 Go to previous message
Vasanthi Sathyanarayanan is currently offline Vasanthi Sathyanarayanan
Messages: 7
Registered: January 2013
Location: Bangalore, India
Junior Member
I think what you are doing is ideal for handling of button enable/disable within the same dialog, as far as I know there is no option exists for enabling/disabling multiple buttons in a single shot within eclipse framework.

Only if you are handling buttons across multiple dialogs then you may have to go in for firing events. And still, you will have to handle enabling/disabling of each button separately.

I hope this helps.



Regards,
Vasanthi
Previous Topic:Print functionality in Linux
Next Topic:org.eclipse.swt.SWTException: Widget is disposed
Goto Forum:
  


Current Time: Wed Aug 20 20:37:37 EDT 2014

Powered by FUDForum. Page generated in 0.01575 seconds