[comp.sys.mac.programmer] Control Manager question

wilcox@wucs1.wustl.edu (Don Wilcox) (07/06/90)

We have been trying to implement a control which behaves much like the standard
scroll bar, except that the size of the thumb can be changed.  The new control
looks much like a scroll bar, with an additional pair of icons which are used
to widen and narrow the thumb.

Unfortunately, we cannot get it to work.  We can display the control, and change
the values of the various parameters using SetCtlValue, etc.  However, when our
application calls _TrackControl with action proc -1L, the control defproc is
never sent message autoTrack.  BTW, we are correctly setting contrlAction to
-1L in the initialization section.  We have tried everything we can come up
with, and cannot get it to work.  If anyone understands this post and can be of
any help, we would be very grateful.

Don

I am rarely capable of expressing my own opinions...

leipold@eplrx7.uucp (Walt Leipold) (01/17/91)

According to Inside Mac I..V, the standard CDEF only works in windows whose
origin is (0,0).  I have an application in which I'd like to simulate a
large physical control board (e.g., for a simulated chemical plant) with a
scroll bar for each physical control, and would like to be able use the
window scrollbars to move the view around in this array of controls.  This
would be a piece of cake if I could just scroll the window by diddling its
origin.  If I can't scroll the window, I'll have to call MoveControl for
every control every time my window is scrolled, which is probably slow and
certainly inelegant.

Does anybody know if the window origin restriction has been lifted in later
versions of the standard CDEF?  (Why is the restriction there, anyway?)
Should I (ugh) write my own scrollbar CDEF?  Or can someone suggest another
method to simulate a large physical array of controls?

Thanks!

--------------------------------------------------------------------------
"Marriage is like a phone call in the night.                  Walt Leipold
First the ring, and then you wake up."          (leipolw%esvax@dupont.com)
--------------------------------------------------------------------------
--
The UUCP Mailer

Lawson.English@p88.f15.n300.z1.fidonet.org (Lawson English) (01/17/91)

To: leipolw%esvax@dupont.com
   
Walt Leipold writes in a message to All

WL> Does anybody know if the window origin restriction has been lifted 
WL> in later versions of the standard CDEF? (Why is the restriction 
WL> there, anyway?) Should I (ugh) write my own scrollbar CDEF? Or 
WL> can someone suggest another method to simulate a large physical 
WL> array of controls? 
WL> Thanks!

If you are using the Think Class Libraries (or presumbably MacAPP) it is a trivial
task.


Lawson
 

--  
Uucp: ...{gatech,ames,rutgers}!ncar!asuvax!stjhmc!300!15.88!Lawson.English
Internet: Lawson.English@p88.f15.n300.z1.fidonet.org