SWT change Tree Node behavior bug
- From: teschner@xxxxxxxxx
- Date: Wed, 21 Nov 2007 01:46:38 -0800 (PST)
Hi
I have a problem with SWT if I exchange the default tree node
appearance with a customized one.
In my case i add a composite to the node which holds a combo box and
some additional textfields.
TreeEditor editor = new TreeEditor(tree);
editor.horizontalAlignment = SWT.LEFT;
editor.grabHorizontal = true;
FieldPanel fieldp = new FieldPanel(tree,0,field);
// FieldPanel is a composite and holds the combo box
editor.setEditor (fieldp, item);
item.setData(editor);
So far so good everything appears normal.
The problem is that the combo box displays only the first letter of
the holding value.
If selected it displays the complete value.
For example:
The values are 'ABC' and 'DEF' the display without selection is just
'A' or just 'D'.
// the code inside the Fieldpanel ...
CCombo cbo = new CCombo(this, SWT.FLAT | SWT.DROP_DOWN);
cbo.setItems(new String [] {"ABC","DEF"});
cbo.setTextLimit(20);
cbo.setSize(30, 20);
cbo.setEditable(false);
I wonder what i am doing wrong here ...
in case this is a known bug, is there any work-around?
Thanks for your help
.
- Follow-Ups:
- Re: SWT change Tree Node behavior bug
- From: teschner
- Re: SWT change Tree Node behavior bug
- Prev by Date: Re: Table Model from Bean
- Next by Date: Re: Screen Resolution
- Previous by thread: Screen Resolution
- Next by thread: Re: SWT change Tree Node behavior bug
- Index(es):