Skip
Skip

Reputation: 6531

Eclipse RCP - How to grey-out dependent preferences?

How to grey out dependent preferences in Eclipse RCP?
Can preferences be somehow defined as dependent from another preferency, so that they are greyed-out, if the preference which it depends from - is disabled? Preferences

Upvotes: 0

Views: 267

Answers (1)

execc
execc

Reputation: 1113

As preferences are just an SWT controls you can call

setEnabled(false) 

method on them to disable (grey-out) them. In case of FieldEditorPreferencePage you should probably call

***FieldEditor.setEnabled(false, getFieldEditorParent());

Upvotes: 1

Related Questions