I need to be able to make a token field with draggable elements like the Mac clock format panel (see the following image).
Thanks so much, Alex.
I need to be able to make a token field with draggable elements like the Mac clock format panel (see the following image).
Thanks so much, Alex.
They're called token fields. Apple has a guide for them. (Without knowing any more details of your goals, that's about as precise as I can get.)
Edit
I noticed the edits to your question. You want something that behaves like System Preference's date panel. Here's a breakdown of what I imagine is happening:
NSTokenField
objects can accept arbitrary objects, as well as strings. So you can drag these objects from the "Time Elements" section onto the token field. The token field's delegate than handles these non-string objects.The guide linked above contains the information for handling non-string elements in token fields. I imagine all you need to do is create models for the data parts you want to represent, and then render them using a (possibly custom) view.