Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!zaphod.mps.ohio-state.edu!rpi!bu.edu!dartvax!eleazar.dartmouth.edu!llama From: llama@eleazar.dartmouth.edu (Joe Francis) Newsgroups: comp.sys.mac.programmer Subject: Re: Scroll Bars using Think C Message-ID: <25416@dartvax.Dartmouth.EDU> Date: 30 Oct 90 05:53:30 GMT References: <31867@netnews.upenn.edu> <21408@well.sf.ca.us> Sender: news@dartvax.Dartmouth.EDU Organization: Dartmouth College, Hanover, NH Lines: 22 In article <21408@well.sf.ca.us> oster@well.sf.ca.us (David Phillip Oster) writes: >Inside Mac, Vol 1, Control Manager chapter states that you must be in >SetOrigin(0,0) for controls to work. Really? In my experience, this is not true. I have implemented a Paned Window class in C++. The Pane object sets the clippin region, ORIGIN, font, etc everytime the pane gets passed a message. It then calls virtual functions in your derived pane class which can be written as if it's upper-left corner in it's enclosing rectangle is at 0,0. I have numerous controls, including scrolling lists, in these panes, some of which do not have their upper-left corners at 0,0. It all works. I've tested it on a plus, II, and IIcx. My guess is it's something different, like only calling LClick if the click was in the list. The scroll bar is actually outside the list rect, so you need to add 15 (or is it 16 - I never can remember :-) to the width of your rect when your are testing your GlobalTolocalled hitpoint. This "feature" has bit many a list novice - including moi. ------------------------------------------------------------------------------ "Read My Lips: No Nude Texans!" - George Bush clearing up a misunderstanding