[Mono-winforms-list] [PATCH] Invalidate non visible areas when scrolling

Chris Toshok toshok at ximian.com
Mon Oct 1 21:11:19 EDT 2007


[d'oh.  sent this already from my hungry.com address, but I think the
list software will block it since I'm subcribed @ximian.com..]


I'm confused.  Why are we invalidating non-visible parts of the screen?
They're not visible.

Chris

On Mon, 2007-09-24 at 14:27 -0500, Carlos Alberto Cortez wrote:
> Hey, 
> 
> While trying to fox bug #324513, I notice that trying to scroll a
> control, which has bigger bounds than any of its Parents controls,
> shows some drawing issues.
> 
> Example: you have a VScrollBar with Height > than its contaning form: 
> 
>   __________
>   |        |          | <- This is the form (Parent)
>   |____|_____|
>            | <- This is the scrollbar
> 
> This is because when we try to scroll a windows, we copy some area of
> it and invalidate the 'new visible' one. 
> But we assume that the entire control is visible (that all its Bounds
> are painted and available to scroll). But it's not the case in this
> case, where the VScrollBar is not entirely visible,
> because it's parents Bounds don't contain it. 
> 
> The attached patch tries to detect all the non-visible regions of a
> control (top, bottom, right, left) and then check if whe are trying to
> scroll part of the non visible area,
> which then is invalidated.
> 
> Carlos.
> _______________________________________________
> Mono-winforms-list maillist  -  Mono-winforms-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-winforms-list



More information about the Mono-winforms-list mailing list