On Wednesday 20 June 2018 03:30:44 fredvs wrote: > Hello Martin. > > Sorry, I do not understand the goal of clampinview. > It adjusts scrollpos so the given rectangle is in paintrect.
> Now about container.frame.sbhorz.pageup/pagedown. > > With a simple demo-test it works. [...] > But inside a more complicated project, with same code, it does not work. > Probably because a widget gets active. If a widget will be activated it calls clampinview(). " procedure twidget.doactivate; var rect1: rectty; begin if fparentwidget <> nil then begin rect1:= getdisprect; if rect1.x < 0 then begin rect1.cx:= rect1.cx + rect1.x; rect1.x:= 0; end; if rect1.x + rect1.cx > fwidgetrect.cx then begin rect1.cx:= fwidgetrect.cx - rect1.x; end; if rect1.y < 0 then begin rect1.cy:= rect1.cy + rect1.y; rect1.y:= 0; end; if rect1.y + rect1.cy > fwidgetrect.cy then begin rect1.cy:= fwidgetrect.cy - rect1.y; end; addpoint1(rect1.pos,fwidgetrect.pos); subpoint1(rect1.pos,fparentwidget.paintpos); fparentwidget.clampinview(rect1,false); end; activechanged; end; " I'll add another flag in order to suppress the behavior. Martin ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ mseide-msegui-talk mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk

