Community
Participate
Working Groups
I don't see api to do this. You can log a Feature Request with SWT for this if you like, at https://bugs.eclipse.org/bugs/enter_bug.cgi?product=Platform&bug_severity=enhancement . Grant "nick" <nick@nicksoftware.net> wrote in message news:e7b2c6$7v7$1@utils.eclipse.org... >> I have a Spinner like this: >> >> ---------------------- >> Spinner tempSpinner = new Spinner(m_composite, SWT.WRAP); >> tempSpinner.setLocation(10 ,10); >> tempSpinner.setSize(100, 20); >> >> tempSpinner.setMinimum(0); >> tempSpinner.setMaximum(12); >> >> tempSpinner.setSelection(6); >> >> tempSpinner.setFocus(); >> >> // now select all digits ... but how? >> ---------------------- >> >> Now I would like the digit "6" to be selected automatically (as it would appear using the >> mouse to select it) in order that the new value can be entered directly using >> the keyboard without having to use the mouse at all. >> >> How can this be achieved? >> >> many thanks!
FH, SN: API that does this would make Spinner consistent with Text and Combo. However with Spinner.setSelection(int) already taken I'm not sure what it would be called.
we can add this API everywhere. we can go with setSelection(int start, int end) or setSelection(Point point).
setSelection is a problem because getSelection is taken. setSelectedText(int, int)/getSelectedText() may be an option, but it is not consistent with Text and Combo. Is selectAll()/delesectAll() or maybe change the behavior of the widget to select the text when it gets focus enough?
Your bug has been moved to triage, visit http://www.eclipse.org/swt/triage.php for more info. I just tested carbon/cocoa/win32/gtk. The text is select when the spinner gets focus. Don't need to call anything.
This is a one-off bulk update. (The last one in the triage migration). Moving bugs from swt-triaged@eclipse to platform-swt-inbox@eclipse.org and adding "triaged" keyword as per new triage process: https://wiki.eclipse.org/SWT/Devel/Triage See Bug 518478 for details. Tag for notification/mail filters: @TriageBulkUpdate