home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.mac.programmer
- Path: sparky!uunet!cs.utexas.edu!sun-barr!ames!agate!apple!mumbo.apple.com!gallant.apple.com!NewsWatcher!user
- From: REEKES@applelink.apple.com (Jim Reekes)
- Subject: Re: LSize Strikes (Not Once But Twice)
- Sender: news@gallant.apple.com
- Message-ID: <REEKES-191192153411@90.10.20.67>
- Date: Thu, 19 Nov 1992 23:34:48 GMT
- References: <jpurlia-191192105158@129.46.5.45>
- Organization: Apple Computer, Inc.
- Followup-To: comp.sys.mac.programmer
- Lines: 41
-
- In article <jpurlia-191192105158@129.46.5.45>, jpurlia@qualcomm.com (John
- Purlia) wrote:
- >
- > Lsize... My, isn't this trap annoying!
- >
- > I've created a list containing both horizontal and vertical scroll bars
- > that fit flush against the right and bottom borders of a window. When the
- > window is resized I invalidate and erase the old scroll bars, then call a
- > routine shich does the resizing for this particular window with a call to
- > LSize. LSize is nice enough to draw the scroll bars for me (thank you, Mr.
- > List Manager), however, when the window is resized such that the new width
- > is greater than the old and the new height is less than the old
- > (effectively dragging the grow icon up and to the right), the region along
- > the horizontal scroll bar which was previously occupied by the rectangle
- > enclosing the grow icon is NOT updated!!! Remember, I invalidated this
- > rectangle immediately before resizing the list via LSize...
- >
- > This behavior does not happen along the vertical scroll bar when the resize
- > is in the opposite direction.
- >
- > What gives????
- >
- > Sure, I could just invalidate the area occupied by the old grow Rect (which
- > I'll probaly do), but something just seems wrong with LSize here!
-
- I found a problem, not exactly like yours, but it may give you a clue. The
- list manager will always "validate" the regions for the two scroll bars
- when you call LSize. This happens even if you DO NOT have scroll bars.
- For me this caused my list to not get the frame I was trying to draw around
- it. The logic in the LSize code is taking the wrong path, and is probably
- calling ValidRgn for your scroll bar area even if it wasn't drawn properly.
- If you called InvalRect on the scroll bar it would probably draw
- correctly. There might be a better way, but that's my clue for you.
-
-
- -----------------------------------------------------------------------
- Jim Reekes, Polterzeitgeist | Macintosh Toolbox Engineering
- | Sound Manager Expert
- Apple Computer, Inc. | "All opinions expressed are mine, and do
- 20525 Mariani Ave. MS: 81-KS | not necessarily represent those of my
- Cupertino, CA 95014 | employer, Apple Computer Inc."
-