Hi guys,
I have a Viewpart in my Eclipse RCP application. It is positioned left to the editor area and contains only a Combo with few texts.
The problem is, when I re-size the ViewPart to be smaller than the biggest text in the Combo and then show up the content of the Combo. It doesn't show the horizontal scrollbar, but instead it shows the whole list of texts.
But the list is wider than the ViewpPart now, thus the list overlaps to the editor area 
content.setLayout(new FillLayout());
Composite content = toolkit.createComposite(parent);
content.setLayout(new GridLayout());
LabelProvider labelProvider = new LabelProvider() {
@Override
public String getText(Object element) {
return ((State) element).getState();
}
};
ComboViewer states = new ComboViewer(content, SWT.H_SCROLL);
states.setLayoutData(GridDataFactory.fillDefaults().grab(true, false).create());
toolkit.adapt(states.getControl(), false, false);
states.setLabelProvider(labelProvider);
states.setContentProvider(new ArrayContentProvider());
states.setInput(getStates());
What am I doing wrong?
[Updated on: Thu, 10 March 2011 10:45] by Moderator