home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.mac.programmer
- Path: sparky!uunet!zaphod.mps.ohio-state.edu!uwm.edu!linac!att!cbnewsk!cbnewsj!att-out!walter!qualcom.qualcomm.com!NewsWatcher!user
- From: jpurlia@qualcomm.com (John Purlia)
- Subject: Re: LSize Strikes (Not Once But Twice)
- Message-ID: <jpurlia-191192155651@129.46.5.45>
- Followup-To: comp.sys.mac.programmer
- Sender: news@qualcomm.com
- Nntp-Posting-Host: 129.46.5.45
- Organization: Qualcomm, Inc.
- References: <jpurlia-191192105158@129.46.5.45>
- Date: Fri, 20 Nov 1992 00:07:14 GMT
- Lines: 63
-
- In article <jpurlia-191192105158@129.46.5.45>, I wrote:
- >
- > 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...
-
- Well, after spending a bit of time walking through LSize, I've discovered
- the following:
-
- LSize first operates on the horizontal scroll bar. It first performs a
- HideControl, then MoveControl, SizeControl and finally ShowControl. Well,
- on the ShowControl call the horizontal scroll bar appears in its entirety,
- just as I'd like it to appear. Now, at this point the case I previously
- outlined above, the new horizontal scroll bar appears on the bottom of the
- window, while the old vertical scroll bar appears where it was before the
- resizing of the window, like so:
- | |
- | | <-- old vertical scroll bar
- | | visible within the clip
- | |
- ________________________|__|___________________
- _______________________________________________ <-- new horz scroller
- : :
- : : <-- where the vertical scroll bar was
- : : before resizing
- : :
-
- LSize then begins work on the vertical scroll bar, however, on the call to
- HideControl the old vertical scroll bar disappears along with the portion
- of the new horizontal scroll bar which intersects the old vertical
- scroller!! Shouldn't LSize validate the freshly drawn region before
- messing with the second control, or at least calculate the intersection of
- the old and new scrollers so that the entire horizontal scroll bar is
- drawn?
-
- The end result is this: | |
- | |
- | |
- | |
- ________________________ ______________________| |
- ________________________ _________________________|
-
- The only way I can see to get the result I want is to accept the resulting
- blank space in the horizontal scroll bar, calculate the rect for the blank
- space myself and invalidate this area after returning from LSize. True, it
- works, but it's visually unattractive drawing. :(
-
- Is this a known bug with LSize?
-
- -- John
-
- ...........................................................................
- John Purlia : My brain; not my company's brain. My brain says...
- jpurlia@qualcomm.com : "The Toolbox giveth, and the Tech Notes taketh away"
- ...........................................................................
-