housen@ssc-vax.UUCP (Kevin Housen) (10/24/89)
I am trying to write a CDEF for a small slider control. After reading through the Control Manager section of IM, which is a little sketchy on CDEFs, and looking through back issues of MacTutor, I could use some hints. The control has only one part, the indicator (i.e. the sliding knob). The control is drawn properly, in response to a drawCntl message. But I can't get the slider to move. My intention was to use the default method of dragging, so the CDEF returns a result of 0 in response to a dragCntl message. I assumed that this would cause TrackControl to drag the indicator about - but it doesn't. In fact, the CDEF never receives a calcCRgns message, so TrackControl couldnt know the region occupied by the indicator. I would really appreciate it if someone could send me an example of source code for a CDEF, or outline the steps needed to construct a simple control, like a slider. I am using Think Pascal 2.01, but source in any language would be helpful. Thanks heaps - Kevin Housen