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

Carlos Alberto Cortez calberto.cortez at gmail.com
Mon Sep 24 15:27:08 EDT 2007


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

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.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-winforms-list/attachments/20070924/30288d8c/attachment.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: xplat-scroll.patch
Type: text/x-patch
Size: 3574 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/mono-winforms-list/attachments/20070924/30288d8c/attachment.bin 

More information about the Mono-winforms-list mailing list