views:

171

answers:

1

I'm using a PaintDC to draw inside a ScrolledPanel. However, when I run the program, the scroll bars have no effect. They're the right size, but the picture doesn't move when you scroll with them.

I figured I may have to convert from logical to device coordinates. I tried x=dc.LogicalToDeviceX(x) and y=dc.LogicalToDeviceY(y), but there was no effect.

Any ideas?

+1  A: 

Got it:

(new_x,new_y)=self.CalcScrolledPosition((old_x,old_y))

Where self is the ScrolledPanel.

cool-RR