Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.
Nebula CTreeCombo
Revision as of 11:55, 25 March 2019 by Unnamed Poltroon (Talk) (Created page with "< Back to Nebula Main Page =Introduction= This widget is an extension of a CCombo text field. It allows user to select a data, but instead of displaying data as a...")
Introduction
This widget is an extension of a CCombo text field. It allows user to select a data, but instead of displaying data as a list it displays data as a tree:
Contents
Usage
You use this widget like a CCombo widget :
CTreeCombo ctc = new CTreeCombo(group, SWT.BORDER | SWT.READ_ONLY); ctc.setLayoutData(new GridData(200, SWT.DEFAULT));
You fill the widget like a Tree widget, so you create CTreeComboItem that can have children:
for (final Country country : modelList) { final CTreeComboItem item = new CTreeComboItem(ctc, SWT.NONE); item.setText(country.getName());
for (final String commiter : country.getCommiters()) { final CTreeComboItem commiterItem = new CTreeComboItem(item, SWT.NONE); commiterItem.setText(commiter); } }
Examples
An example called PasswordRevealerSnippet.java is located in the plugin org.eclipse.nebula.widgets.passwordrevealer.snippets.
This example is also available here : CTreeComboSnippet.java