Java Code Examples for org.eclipse.swt.widgets.Text.setSelection()

The following are Jave code examples for showing how to use setSelection() of the org.eclipse.swt.widgets.Text class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
Example 1
Project: bdf2   File: AbstractSection.java   Source Code and License Vote up 5 votes
public void controlChanged(Control control) {
	sectionChanged(control);
	if (control instanceof Text) {
		Text t = ((Text) control);
		t.setFocus();
		t.setSelection(t.getText().length());
	} else if (control instanceof Combo) {
		Combo combo = (Combo) control;
		combo.setFocus();
	} else {
		control.setFocus();
	}
}