Bug 4909

Summary: EC: Combo.setText doesn't work on Linux
Product: [Eclipse Project] Platform Reporter: Grant Gayed <grant_gayed>
Component: SWTAssignee: Grant Gayed <grant_gayed>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 2.0   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:

Description Grant Gayed CLA 2001-10-11 16:02:42 EDT
I tried the following snip of code on build 0.137 under Linux
and ended up with a combo box that was all gray (no text), though the
entries were there to choose from when I dropped it down:

  Combo combo = new Combo(shell, SWT.BORDER | SWT.READ_ONLY | SWT.DROP_DOWN);
  combo.add("one little entry");
  combo.add("two of them");
  combo.add("three is too many");
  combo.setText("two of them");

Note that under Windows, this worked, ie the string "two of them"
appeared in the combo. If I called setText with a string that wasn't
previously added (like combo.setText("not there");), the box stayed gray
since it's read only and must be one of the choices.
Comment 1 Grant Gayed CLA 2001-10-12 15:10:12 EDT
Fixed Motif behaviour to match Windows behaviour.