[Prev][Next][Index][Thread]
Re: Using DUIM's <viewport>
Dustin Voss <agent_@mindspring.com> writes:
> Can you (or anyone) think of a way to automatically repaint this?
> Maybe hook into some event somewhere?
If you don't mind a bit of flicker when scrolling, adding the
following method will do the trick:
-----------------8<-----------------
define method note-viewport-position-changed(
frame :: <scroll-test-frame>,
sheet :: <sheet>, x, y) => ()
next-method();
let region = frame.lists-pane.sheet-region;
with-sheet-medium (medium = sheet)
clear-box*(medium, region)
end;
repaint-sheet(sheet, region);
do-sheet-children(update-gadget, frame.lists-pane);
end;
-----------------8<-----------------
The method note-viewport-position-changed gets called when the
scrolling area is scrolled. It is called by scroll-viewport-child. It
looks like the redraw problem is somewhere in scroll-viewport-child or
something it calls. The method above erases the list panes and then
forces them to update again after scroll-viewport-child is called.
It is specialised on the frame so you'll have to add this method for
each frame where you do this sort of thing.
Hope that helps,
Chris.
--
http://www.double.co.nz/dylan
Follow-Ups:
References: