On Mar 10, 2010, at 8:04 PM, Quincey Morris wrote: > On Mar 10, 2010, at 15:54, Brian Postow wrote: > >> Basically, I want the topView to scroll, but I always want to be able to see >> the buttonView. So if part of the topView isn't visible because it's been >> scrolled up, I want the buttonview at the top of the screen. >> >> I think what I want is to have a sort of topView2 which is the intersection >> between topView and the contentView of the ScrollView, if that makes more >> sense... > > It makes sense, but it doesn't have much precedent in terms of known Mac > interfaces. Won't the visual effect be that the buttons appear to float over > the window content some of the time? But with the weird side effect that the > image below the buttons will get smaller as you scroll, until ... what? At > some point does the image view get too small and disappear? When there's not > enough vertical room to show the whole buttons, do they start scrolling out > of the window? > > It seems awfully ad-hoc, but anyway ...
Yeah, I think that that is what I wanted, and yeah, it does sound a little ad-hoc... > >> In case the backstory helps, I'm writing a plugin for Mozilla. So, the >> outermost scrollwindow is the firefox "view", and then my plugin is within >> an HTML frame inside the page, so I'm scrolling around in the firefox >> window, and whenever my plugin is visible, I want the buttons at the top of >> it... > > Yeah, that does help a bit. > > If you must follow this approach, then I'd suggest you register to get > frame-changed notifications from topView. That way, you'll know if it moved > within the window, or if it was resized as a result of the window/enclosing > view resizing. Also, turn off auto-resizing for subviews of topView. > > When you get a notification, examine the geometry of the page, and re-layout > your subviews appropriately (float the buttons, resize the image, etc). > You'll then be able to avoid geometry collapse when the visible part of > topView gets small. Interesting. I think I agree with you that this sounds like it's more effort than it's worth... I like your approach, and I'll probably end up using it if and when this feature makes it back to the top of my list... > THANKS! Brian Postow Senior Software Engineer Acordex Imaging Systems _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com