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

  1. Newsgroups: comp.sys.mac.programmer
  2. Path: sparky!uunet!zaphod.mps.ohio-state.edu!uwm.edu!linac!att!cbnewsk!cbnewsj!att-out!walter!qualcom.qualcomm.com!NewsWatcher!user
  3. From: jpurlia@qualcomm.com (John Purlia)
  4. Subject: Re: LSize Strikes (Not Once But Twice)
  5. Message-ID: <jpurlia-191192155651@129.46.5.45>
  6. Followup-To: comp.sys.mac.programmer
  7. Sender: news@qualcomm.com
  8. Nntp-Posting-Host: 129.46.5.45
  9. Organization: Qualcomm, Inc.
  10. References: <jpurlia-191192105158@129.46.5.45>
  11. Date: Fri, 20 Nov 1992 00:07:14 GMT
  12. Lines: 63
  13.  
  14. In article <jpurlia-191192105158@129.46.5.45>, I wrote:
  15. > I've created a list containing both horizontal and vertical scroll bars
  16. > that fit flush against the right and bottom borders of a window.  When the
  17. > window is resized I invalidate and erase the old scroll bars, then call a
  18. > routine shich does the resizing for this particular window with a call to
  19. > LSize.  LSize is nice enough to draw the scroll bars for me (thank you, Mr.
  20. > List Manager), however, when the window is resized such that the new width
  21. > is greater than the old and the new height is less than the old
  22. > (effectively dragging the grow icon up and to the right), the region along
  23. > the horizontal scroll bar which was previously occupied by the rectangle
  24. > enclosing the grow icon is NOT updated!!!  Remember, I invalidated this
  25. > rectangle immediately before resizing the list via LSize...
  26.  
  27. Well, after spending a bit of time walking through LSize, I've discovered
  28. the following:
  29.  
  30. LSize first operates on the horizontal scroll bar.  It first performs a
  31. HideControl, then MoveControl, SizeControl and finally ShowControl.  Well,
  32. on the ShowControl call the horizontal scroll bar appears in its entirety,
  33. just as I'd like it to appear.  Now, at this point the case I previously
  34. outlined above, the new horizontal scroll bar appears on the bottom of the
  35. window, while the old vertical scroll bar appears where it was before the
  36. resizing of the window, like so:
  37.                         |  |
  38.                         |  |   <-- old vertical scroll bar
  39.                         |  |       visible within the clip
  40.                         |  |
  41. ________________________|__|___________________
  42. _______________________________________________   <-- new horz scroller
  43.                         :  :
  44.                         :  :   <-- where the vertical scroll bar was
  45.                         :  :       before resizing
  46.                         :  :
  47.  
  48. LSize then begins work on the vertical scroll bar, however, on the call to
  49. HideControl the old vertical scroll bar disappears along with the portion
  50. of the new horizontal scroll bar which intersects the old vertical
  51. scroller!!  Shouldn't LSize validate the freshly drawn region before
  52. messing with the second control, or at least calculate the intersection of
  53. the old and new scrollers so that the entire horizontal scroll bar is
  54. drawn?
  55.  
  56. The end result is this:                          |  |
  57.                                                  |  |
  58.                                                  |  |
  59.                                                  |  |
  60. ________________________   ______________________|  |
  61. ________________________   _________________________|
  62.  
  63. The only way I can see to get the result I want is to accept the resulting
  64. blank space in the horizontal scroll bar, calculate the rect for the blank
  65. space myself and invalidate this area after returning from LSize.  True, it
  66. works, but it's visually unattractive drawing.  :(
  67.  
  68. Is this a known bug with LSize?
  69.  
  70. -- John
  71.  
  72. ...........................................................................
  73. John Purlia          : My brain; not my company's brain.  My brain says...
  74. jpurlia@qualcomm.com : "The Toolbox giveth, and the Tech Notes taketh away"
  75. ...........................................................................
  76.