Scrolling picture in panel

cbreemer

Well-known member
Joined
Dec 1, 2021
Messages
184
Programming Experience
10+
I have a PictureBox in a Panel with scrollbars. I can scroll the picture fine but it annoys me that the picture does not move along while dragging the scrollbar. It only changes position when I release the mouse button. Would there be a simple solution for this ?
 
How soon we forget that the was how the original GUI scrollbars worked in the good old days when there was no live feedback while dragging the scroll thumb...

If you don't like the behaviour, use a different UI framework that sends notifications while dragging the thumb, or override the mouse handling of the current control.
 
Yes, those halcyon days. Actually this is atrocious behavior, especially if you have a large image in a small panel.
I was really hoping there would be some setting for this, but I guess I'll need to about programming it myself.
 
Well, you are using a technology from those halcyon days (WinForms) ;)
I know. It usually works fine for me and I'm too old and too lazy to change my ways 😁 Actually Visual Studio 2022 seems to use it too, at least in the forms editor - the form won't scroll until you release the mouse.
 
I recall when we were writing the Win95 RichEdit 1.0 control, we were trying to figure out how to get the client area to efficiently update dynamically while the user moved the scroll thumb. We were trying to this because the rest of the Win95 UI being developed by the shell team was starting to implement dynamically updating the UI while the scrollbar was being moved around. This was quite challenging to do based on the requirements that we needed to make sure that it would run on a single processor 386 20MHz machine with 4MB of RAM. Furthermore, we couldn't rely on using threads because Win95 was like Win31 and older where it was cooperative multi-tasking -- no threading.
 
Back
Top Bottom