comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: widget for incrementing/decrementing an integer
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: widget for incrementing/decrementing an integer [message #61503] Thu, 17 July 2008 12:46
Vince Hradil is currently offline  Vince Hradil
Messages: 574
Registered: December 1999
Senior Member
On Jul 17, 2:43 pm, David Fanning <n...@dfanning.com> wrote:
> Vince Hradil writes:
>> Here's what the "slider" widget looks like:http://tinyurl.com/5uvnts
>
> *Much* easier to implement, but does the "slider" do
> the acceleration thingy?
>
> Cheers,
>
> David
>
> --
> David Fanning, Ph.D.
> Fanning Software Consulting, Inc.
> Coyote's Guide to IDL Programming (www.dfanning.com)
> Sepore ma de ni thui. ("Perhaps thou speakest truth.")

I'm not sure. But do I get "extra credit" for simplicity?
Re: widget for incrementing/decrementing an integer [message #61504 is a reply to message #61503] Thu, 17 July 2008 12:43 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Vince Hradil writes:

> Here's what the "slider" widget looks like: http://tinyurl.com/5uvnts

*Much* easier to implement, but does the "slider" do
the acceleration thingy?

Cheers,

David

--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming (www.dfanning.com)
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
Re: widget for incrementing/decrementing an integer [message #61505 is a reply to message #61504] Thu, 17 July 2008 12:17 Go to previous message
Vince Hradil is currently offline  Vince Hradil
Messages: 574
Registered: December 1999
Senior Member
On Jul 17, 2:02 pm, David Fanning <n...@dfanning.com> wrote:
> Mike Galloy writes:
>> These are called "spinners". I had one of these, but no longer have
>> access to the source code (and a quick Google search didn't turn up
>> anything). They are not too hard to make, I just displayed the images
>> of up and down arrows in resource/bitmaps in a draw widget and handled
>> the events. For extra credit, make the button press 3D and have an
>> acceleration effect when the button is held down.
>
> I've put the one from my Catalyst Library on my web page
> for you to take a look at. It's written as an object, etc.,
> so you won't be able to use it directly. But you are probably
> looking for the guts of the code, anyway, and that is all
> there. The buttons aren't in 3D, but it does accelerate if
> you hold the button down for a second or so. :-)
>
>   http://www.dfanning.com/misc/spinner__define.pro
>
> And here is a picture of it:
>
>   http://www.dfanning.com/misc/spinner.png
>
> Cheers,
>
> David
>
> --
> David Fanning, Ph.D.
> Fanning Software Consulting, Inc.
> Coyote's Guide to IDL Programming (www.dfanning.com)
> Sepore ma de ni thui. ("Perhaps thou speakest truth.")

Here's what the "slider" widget looks like: http://tinyurl.com/5uvnts
Re: widget for incrementing/decrementing an integer [message #61507 is a reply to message #61505] Thu, 17 July 2008 12:02 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Mike Galloy writes:

> These are called "spinners". I had one of these, but no longer have
> access to the source code (and a quick Google search didn't turn up
> anything). They are not too hard to make, I just displayed the images
> of up and down arrows in resource/bitmaps in a draw widget and handled
> the events. For extra credit, make the button press 3D and have an
> acceleration effect when the button is held down.

I've put the one from my Catalyst Library on my web page
for you to take a look at. It's written as an object, etc.,
so you won't be able to use it directly. But you are probably
looking for the guts of the code, anyway, and that is all
there. The buttons aren't in 3D, but it does accelerate if
you hold the button down for a second or so. :-)

http://www.dfanning.com/misc/spinner__define.pro

And here is a picture of it:

http://www.dfanning.com/misc/spinner.png

Cheers,

David

--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming (www.dfanning.com)
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
Re: widget for incrementing/decrementing an integer [message #61508 is a reply to message #61507] Thu, 17 July 2008 11:51 Go to previous message
Vince Hradil is currently offline  Vince Hradil
Messages: 574
Registered: December 1999
Senior Member
On Jul 17, 1:32 pm, "mgal...@gmail.com" <mgal...@gmail.com> wrote:
> On Jul 17, 12:00 pm, cgoet...@igpp.ucla.edu wrote:
>
>> Hello All,
>
>> I'm looking for a good way to create a widget that simply increments
>> or decrements an integer (an editable text box with up and down arrows
>> on the right hand side of the box). I tried using a text widget with
>> scroll bars, but that seems clumsy at best (besides I cannot figure
>> out how to remove the horizontal scroll bars). Anyone have a
>> suggestion on a nice/clean way to implement that? Is there an existing
>> widget that I'm missing?
>
> These are called "spinners". I had one of these, but no longer have
> access to the source code (and a quick Google search didn't turn up
> anything). They are not too hard to make, I just displayed the images
> of up and down arrows in resource/bitmaps in a draw widget and handled
> the events. For extra credit, make the button press 3D and have an
> acceleration effect when the button is held down.
>
> Mike
> --www.michaelgalloy.com
> Tech-X Corporation
> Software Developer II

Just use a slider widget - make it "vertical" and make the x and y
size of the slider really small. It works pretty well, actually.
Re: widget for incrementing/decrementing an integer [message #61509 is a reply to message #61508] Thu, 17 July 2008 11:32 Go to previous message
Michael Galloy is currently offline  Michael Galloy
Messages: 1114
Registered: April 2006
Senior Member
On Jul 17, 12:00 pm, cgoet...@igpp.ucla.edu wrote:
> Hello All,
>
> I'm looking for a good way to create a widget that simply increments
> or decrements an integer (an editable text box with up and down arrows
> on the right hand side of the box). I tried using a text widget with
> scroll bars, but that seems clumsy at best (besides I cannot figure
> out how to remove the horizontal scroll bars). Anyone have a
> suggestion on a nice/clean way to implement that? Is there an existing
> widget that I'm missing?

These are called "spinners". I had one of these, but no longer have
access to the source code (and a quick Google search didn't turn up
anything). They are not too hard to make, I just displayed the images
of up and down arrows in resource/bitmaps in a draw widget and handled
the events. For extra credit, make the button press 3D and have an
acceleration effect when the button is held down.

Mike
--
www.michaelgalloy.com
Tech-X Corporation
Software Developer II
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: widget for incrementing/decrementing an integer
Next Topic: Re: "Variable undefined" error in LOADCT?

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Sun Oct 12 04:57:39 PDT 2025

Total time taken to generate the page: 0.96496 seconds