short [] s = new short [] {(short)selection.x, (short)selection.y}; OS.SetControlData (handle, OS.kHIComboBoxEditTextPart, OS.kControlEditTextSelectionTag, 4, s);
int length = getCharCount (); int start = selection.x, end = selection.y; ControlEditTextSelectionRec sel = new ControlEditTextSelectionRec (); sel.selStart = (short) Math.min (Math.max (Math.min (start, end), 0), length); sel.selEnd = (short) Math.min (Math.max (Math.max (start, end), 0), length); if (hasFocus ()) { OS.SetControlData (handle, OS.kHIComboBoxEditTextPart, OS.kControlEditTextSelectionTag, 4, sel); } else { this.selection = sel; }
public void setSelection (Point selection) {	checkWidget ();	if (selection == null) error (SWT.ERROR_NULL_ARGUMENT);	if ((style & SWT.READ_ONLY) == 0) {		short [] s = new short [] {(short)selection.x, (short)selection.y};		OS.SetControlData (handle, OS.kHIComboBoxEditTextPart, OS.kControlEditTextSelectionTag, 4, s);	}}