Bug 39996 - [CCombo] Read-only CCombo shows caret
Summary: [CCombo] Read-only CCombo shows caret
Status: NEW
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows XP
: P3 normal with 3 votes (vote)
Target Milestone: ---   Edit
Assignee: Duong Nguyen CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-07-13 16:49 EDT by Nick Edgar CLA
Modified: 2019-09-06 16:17 EDT (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.