Bug 39996

Summary: [CCombo] Read-only CCombo shows caret
Product: [Eclipse Project] Platform Reporter: Nick Edgar <n.a.edgar>
Component: SWTAssignee: Duong Nguyen <duongn>
Status: NEW --- QA Contact:
Severity: normal    
Priority: P3 CC: christian.kaestner, crevells, Michal.Tkacz, schtoo, steve_northover
Version: 3.0   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Nick Edgar CLA 2003-07-13 16:49:11 EDT
build I20030710

If you run the following code, the text field of the CCombo has a flashing 
caret.  It should not, since it is READ_ONLY.

Please let me know if there is a workaround.

public class CComboTest {

	public static void main(String[] args) {
		String[] texts = { 
			"Item 1 abcd", "Item 2 efg", "Item 3 hi",
			"Item 4 abcd", "Item 5 efg", "Item 6 hi", 
			"Item 7 abcd", "Item 8 efg", "Item 9 hi" 
		};

		Display display = new Display();
		Shell shell = new Shell(display);
		CCombo combo = new CCombo(shell, SWT.READ_ONLY);
		combo.setItems(texts);
		combo.setSize(combo.computeSize(200, SWT.DEFAULT));
		shell.pack();
		shell.open();
		while (!shell.isDisposed()) {
			if (!display.readAndDispatch())
				display.sleep();
		}
		display.dispose();
	}
}
Comment 1 Nick Edgar CLA 2003-07-13 16:53:04 EDT
Compare with Combo.  When it's READ_ONLY, the text field is fully selected and 
has a focus rectangle around the whole area, but there is no caret.
Comment 2 Steve Northover CLA 2007-06-11 12:12:05 EDT
There is no strict requirement that a CCombo look or behave like a native combo.
Comment 3 Eclipse Webmaster CLA 2019-09-06 16:17:23 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.