[comp.sys.mac.apps] TrackControl / Scrollbar problem in THINK Pascal. Help?

Julian.Anderson@comp.vuw.ac.nz (Julian Anderson) (02/18/91)

	Can someone give me a hand with a problem I have with handling
scroll-bars in THINK Pascal? I have to write a one-off Mac client to a
UNIX terminal booking database, and the database and protocols are
easy, but I cannot make the Mac (SE) respond properly to scroll-bars.
I have a box set up with the room-names in it, and I want to make it
scroll in response to the mouse.
	I am using 
	PartNum := TrackControl(ScrollBarHandle,point,NIL);
	when the mouse is in the right place. I _know_ the window is
active, and that the mouseclick is in the right place. This works fine
for dragging and moving the thumbwheel (? ScrollBox? littlesquare?),
and it sets the controlMax and controlMin fields perfectly. However,
if you click in the UpArrow, PageUp or PageDown part, it only works
sporadicaly, ie one push in twenty might work. I have tried using the
default action procedures.

	If I move the thumbwheel (? ScrollBox? littlesquare?),
TrackControl returns part number zero, but works perfectly, ie
adjusting the control value.
	If I push the up arrow, it highlights, and about one time in
twenty it returns the correct part number. Otherwise nothing happens.
It never changes the control value.
	Page up and page down don't do a damn thing.
	Down arrow just causes a sysbeep, as if it wasn't in the
control at all.
	I have tried defining an action procedure for trackControl to
respond to the part number, but it makes no difference, as the part
number is almost always 0 (except in the case of uparrow which returns
decimal 20 about %5 of the time).
	
	Suggestions?
		Email if possible.
			Thanks in advance.
						Jules
--
 sniveley@comp.vuw.ac.nz |If you can't blind them with science, baffle
 jules@rata.vuw.ac.nz    |them with bull. If _that_ doesn't work, try
 jules@kauri.vuw.ac.nz   |sincerity. It surprises them long enough to         
ain't nufin to do wif VUW|get in a few good hits.