سؤال

How do I force the CheckboxTreeViewer class to allow for only one checked element? I could not find a style that enforces this behavior.

The only other alternative I have to so capture the check event and uncheck the other elements

هل كانت مفيدة؟

المحلول

SWT.SINGLE AND SWT.MULTI style bits are related to single or multiple selection in list, tree and tables.

But AFAIK you have to use addCheckStateListener and deselect all elements first and then toggle the check state of current element.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top