[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [sc-dev] resize on views within a scrollview?




On 15 Dec 2009, at 16:31, Scott Wilson wrote:


I suppose an alternative approach is to make resize behaviour respond to changes in the internal bounds. That might make more sense and would deal–I think–with cases like yours (internal bounds must be at least as big as the visible bounds). I'd need to think about whether that would also cause problems. It could be a bit odd as adding views could trigger resizes. You might still need a callback for complex cases.

Okay, I just took a quick look at this, and I can see an issue. Currently users don't need to worry about the internal bounds of scroll views: they adjust automatically to the union of the viewport extent and all contained views. So this means that if you change bounds of a view, it could trigger a change in the size of the internal bounds, which in turn could cause any views which auto-resize to change, including possibly the initial view itself. This seems counterintuitive, but I'm not sure how to avoid this, at least without making the internal bounds something you must explicitly set. Optionally clipping them in some way might be a compromise.

S.