Re: NSStepper and Time
Re: NSStepper and Time
- Subject: Re: NSStepper and Time
- From: David P Henderson <email@hidden>
- Date: Mon, 20 May 2002 08:24:50 -0400
On Sunday, May 19, 2002, at 12:11 , Yannick Wurm wrote:
This is my first post to Cocoadev! I'm building a small app where the
user has to enter a time into a textfield (hh:mm:ss). What I'd
optimally like to do is what Apple did in System Preference's Date and
Time, where the user clicks on one part of the time displayed in a
NSTextField (for example the number of minutes) and can use the
NSStepper immediately to the right of the TextField to increment or
decrement that value. What's nice about this, is that you only have
one NSStepper which can controls the three values of the time. Is that
hard to do? I'm supposing I would have to subclass NSTextField, which,
being a cocoa newbie, seems waaay too complicated. But maybe I'm
missing something obvious that would let me implement this easily? (I
unsuccessfully looked through all the opensource Alarmclock projects I
could find...)
The other solution I see is to put three TextFields and three
NSSteppers, which really isn't elegant.
If you look at the nib file for the time setting, you will notice, by
examining it, that Apple uses 4 text fields and 1 stepper. 3 small ones
imposed on a larger one. I'll the details of how it works for the reader
to figure out.
Dave
--
Chaos Assembly Werks
"Suburbia is where the developer bulldozes out the trees, then names the
streets after them."
- Bill Vaughn
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.