D
David D Webb
I am trying to scroll a picture larger than the screen.
I have a form with a panel on it (240H). On this panel, I have a picture
box that is larger than the panel (960H). I have a vertical scroll bar on
the form next to the panel. Changing the scrollbar moves the picture box up
and the panel defines the viewing area:
this.pboxWeekCal.Top = -(this.vScrollBar.Value * 40);
Now, I didn't think the picture box would handle the clipping and redrawing
correctly. But I thought it would only have a blank area where the new
region came into view from the scrolling. What is happening though, is the
entire picturebox goes blank by just moving the scrollbar one change value.
Is the default paint event wiping it clear or something like that? Is there
a better way to do this. I have an offscreen bitmap that I can buffer from,
and worse case scenario, I'll redraw the entire viewable region for every
scroll change - in that case I'll just get rid of the picturebox and copy
onto the first panel directly.
Thanks,
Dave
Using Visual Studio 2003 and .NET CF sp2.
I have a form with a panel on it (240H). On this panel, I have a picture
box that is larger than the panel (960H). I have a vertical scroll bar on
the form next to the panel. Changing the scrollbar moves the picture box up
and the panel defines the viewing area:
this.pboxWeekCal.Top = -(this.vScrollBar.Value * 40);
Now, I didn't think the picture box would handle the clipping and redrawing
correctly. But I thought it would only have a blank area where the new
region came into view from the scrolling. What is happening though, is the
entire picturebox goes blank by just moving the scrollbar one change value.
Is the default paint event wiping it clear or something like that? Is there
a better way to do this. I have an offscreen bitmap that I can buffer from,
and worse case scenario, I'll redraw the entire viewable region for every
scroll change - in that case I'll just get rid of the picturebox and copy
onto the first panel directly.
Thanks,
Dave
Using Visual Studio 2003 and .NET CF sp2.