Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!zaphod.mps.ohio-state.edu!brutus.cs.uiuc.edu!apple!stevec From: stevec@Apple.COM (Steve Christensen) Newsgroups: comp.sys.mac.programmer Subject: Re: Using Scrollbars in Dialog Boxes Message-ID: <9752@goofy.Apple.COM> Date: 14 Aug 90 22:45:57 GMT References: <1990Aug14.170520.12153@Neon.Stanford.EDU> Distribution: na Organization: Apple Computer Inc., Cupertino, CA Lines: 25 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." ____________________________________________________________________