Bug 148601 - [Widgets] Digits cannot be selected in a Spinner
Summary: [Widgets] Digits cannot be selected in a Spinner
Status: NEW
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 3.2   Edit
Hardware: PC Windows All
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Platform-SWT-Inbox CLA
QA Contact: Felipe Heidrich CLA
URL:
Whiteboard:
Keywords: triaged
Depends on:
Blocks:
 
Reported: 2006-06-26 03:37 EDT by nick CLA
Modified: 2017-08-03 12:28 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description nick CLA 2006-06-26 03:37:33 EDT
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!
Comment 1 Grant Gayed CLA 2006-06-26 12:19:09 EDT
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.
Comment 2 Felipe Heidrich CLA 2009-08-21 14:17:18 EDT
we can add this API everywhere.

we can go with setSelection(int start, int end) or setSelection(Point point).
Comment 3 Silenio Quarti CLA 2009-08-21 14:49:47 EDT
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?
Comment 4 Felipe Heidrich CLA 2009-08-21 14:51:21 EDT
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.
Comment 5 Leo Ufimtsev CLA 2017-08-03 12:28:33 EDT
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