home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / sys / mac / programm / 18680 < prev    next >
Encoding:
Text File  |  1992-11-19  |  2.6 KB  |  54 lines

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