[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
|
[news.eclipse.tools] Re: Need a widget to represent an integer with up/down arrows to icr/dcr the value.
|
- From: evansac@xxxxxxxxxxx (Alun)
- Date: Fri, 2 May 2003 17:51:28 +0000 (UTC)
- Newsgroups: eclipse.tools
- Organization: http://www.eclipse.org
- User-agent: NewsPortal 0.23
Hi Heather,
The widget you describe is called, I believe, a Spinner. SWT doesn't
come with one. However, this article discusses how you might implement
one and provides some example code. This may suffice for what you need.
Article:
http://www.eclipse.org/articles/Article-Writing%20Your%20Own%20Widget/Writing%20Your%20Own%20Widget.htm
Sample code:
http://www.eclipse.org/articles/Article-Writing%20Your%20Own%20Widget/Writing%20Your%20Own%20Widget_files/AppendixE.htm
Cheers,
Alun
PS. Check out the new SWT newsgroup.
Heather wrote:
> Hi,
> I'm looking for a widget that I can use to represent an integer value.
> This widget needs to have both up and down arrows attached so the integer
> value can be increased and decreased. A perfect example would be the
> "Number of Copies" field in a typical print page. The widget also needs to
> support minimum and maximum values (i.e. up and down arrows don't go
> forever). I don't need to set the step of increment/decrement, i.e. step
> of 1 is perfect. I do need the integer to be displayed, so Slider and
> Scale don't look right.
> Any ideas?
> Thanks a lot!
> Heather