Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » JFace » Disable one radio button in a RadioGroupFieldEditor
Disable one radio button in a RadioGroupFieldEditor [message #901185] Fri, 10 August 2012 04:47 Go to next message
Mikael Petterson is currently offline Mikael Petterson
Messages: 152
Registered: July 2009
Senior Member
Hi,

I need to toggle (enable/disable) a radio button in a RadioGroupFieldEditor depending on the value of
my BooleanFieldEditor. Is it possible?

br,

//mike
Re: Disable one radio button in a RadioGroupFieldEditor [message #901765 is a reply to message #901185] Tue, 14 August 2012 09:42 Go to previous message
Heiko  Böttger is currently offline Heiko Böttger
Messages: 4
Registered: July 2009
Junior Member
Looking at the code of RadioGroupFieldEditor it seems like there is no way to access the radion-buttons themselves. You can do a dirty hack and invoke the getRadioBoxControl(parent) and access the radiobuttons via the getChildren()-method of the composite (group). However be aware that this hack may break when the code of the RadioGroupFieldEditor changes. If you use the hack, consider to open a feature request in bugzilla for adding a setVisibleMethod or open up the fieldeditor a little bit. May be they could could make the fields at least protected, allowing you to create a subclass.

Best Regards
Heiko
Previous Topic:How to do empty selection (IStructuredSelection.isEmpty() == true)?
Next Topic:detect class name of opened jface dialog,detect at runtime
Goto Forum:
  


Current Time: Sat Aug 30 22:31:44 EDT 2014

Powered by FUDForum. Page generated in 0.01463 seconds