Resolved Draw and scroll

aronmatthew

Active member
Joined
Aug 5, 2019
Messages
41
Programming Experience
Beginner
When drawing on a panel Im having a problem with the scroll destroying the drawing. At this point I'm very confused since with adding controls to the panel it is not allowing me to scroll to check if the transformation method is fixing the drawing. But when controls are added to the panel the scroll works but the drawing is destroyed on scroll. I have no idea how to solve this and and attempt to improvise a solution seems unreasonable without mechanical reference.
 
If what you did is not working then you did it wrong. If we can't see what you did, we can't see what's wrong with it. Post the simplest code you can that we can run as is and see the incorrect behaviour you describe.
 
Also, how exactly are you drawing to the panel? Do you handle the paint event for the panel, or are you just arbitrarily drawing on the panel at some point in time, and not redrawing afterwards?
 
The paint handler for the panel simply draws to the panel and calls to translate transform using the auto scroll positions. The panel auto scroll is also set to true.
 
Which paint handler? For the panel or for the form?
 
Back
Top Bottom