Bug 80074 - [consistency] Combo.setText behavior is inconsistent
Summary: [consistency] Combo.setText behavior is inconsistent
Status: CLOSED WONTFIX
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Grant Gayed CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords: consistency
Depends on:
Blocks:
 
Reported: 2004-12-02 18:44 EST by Carolyn MacLeod CLA
Modified: 2019-09-04 01:54 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Carolyn MacLeod CLA 2004-12-02 18:44:26 EST
Run the following snippet on Windows and GTK, and notice that the text is 
selected. Now run it on Motif and notice that the text is not selected. Didn't 
try it on Mac. Should probably have selectAll behavior on all platforms.

import org.eclipse.swt.*;
import org.eclipse.swt.widgets.*;
import org.eclipse.swt.layout.*;

public class ComboSelectAllFocusTest {
	
	public static void main(String[] args) {
		Display display = new Display();
		Shell shell = new Shell(display);
		shell.setLayout(new FormLayout());
		
		String items[] = {"one", "two", "three"};
		Combo combo = new Combo(shell, SWT.SINGLE | SWT.BORDER);
		combo.setItems(items);
		combo.setText(items[0]);

		shell.pack();
		shell.open();
		while (!shell.isDisposed()) {
			if (!display.readAndDispatch()) display.sleep();
		}
	}
}
Comment 1 Carolyn MacLeod CLA 2004-12-02 18:49:26 EST
I thought there was an old bug noting this behavior in the context of the 
Find/Replace dialog, but I can't find it. It looks like the behavior was 
worked around for the Find/Replace dialog's Find field (but not the Replace 
field). Anyhow, if the Motif behavior is made consistent with Win and GTK, 
then I suspect that the work-around in the Find/Replace dialog can be removed.
Comment 2 Carolyn MacLeod CLA 2004-12-02 18:52:53 EST
Aha - I found it: bug 10407. So if we emulate the "select all" behavior on 
Motif, the old bug should be reopened to remove the work-around.
Comment 3 Steve Northover CLA 2005-01-19 19:57:41 EST
Grant to prioritize.
Comment 4 Lars Vogel CLA 2019-09-04 01:54:41 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 and remove the stalebug whiteboard tag. 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.

--