[comp.sys.mac.programmer] Using Scrollbars in Dialog Boxes

commons@Sunburn.Stanford.EDU (Peter Commons) (08/15/90)

I'm trying to use scrollbars in a dialog box and have run into a bit of a snag.
If I make a call to ModalDialog(), how do I (when do I) track the user's 
manipulation of the scrollbar? Do I need to write my own filterProc? 

Thanks.

--
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
|   Peter Commons			"Zut, alors! I have meesed one!!!"    |
|   commons@cs.stanford.edu						      |
|   Computer Science Department, Stanford University			      |

stevec@Apple.COM (Steve Christensen) (08/15/90)

In article <1990Aug14.170520.12153@Neon.Stanford.EDU> Peter Commons writes:
>I'm trying to use scrollbars in a dialog box and have run into a bit of a snag.
>If I make a call to ModalDialog(), how do I (when do I) track the user's 
>manipulation of the scrollbar? Do I need to write my own filterProc? 

As I recall, if you have a button, checkbox, or control item in a dialog,
ModalDialog will handle tracking the control for you and then return with
the dialog item number in itemHit.  Unfortunately for scrollbars, the tracking
just nudges the position by 1 (i.e., no auto scroll).  If I need a scrollbar
in a dialog, I've just made the item a userItem, built my own scrollbar, and
then when I get a click on the userItem, I call TrackControl() with or with-
out an actionProc depending on whether or not the hit was in the thumb...

steve

-- 
____________________________________________________________________

  Steve Christensen             Internet:   stevec@goofy.apple.com
  Apple Computer, Inc.          AppleLink:  STEVEC
  20525 Mariani Ave, MS 81-CS   CompuServe: 76174,1712
  Cupertino, CA  95014

  "You just contradicted me."  "No I didn't."
____________________________________________________________________