April 14th, 2012, 03:40 PM
Bug with Panel scrollbars, or an error on my part?
[Using VB.NET 2010 / targeting the .NET 2.0 framework]
I'm getting some unexpected behavior with panel scrollbars, and was wondering if it is a bug, or simply something that I'm failing to do correctly.
Basically, I have a panel with Autoscroll enabled. Then I put some other items inside the panel, and then make the panel smaller, so that the panel's scrollbars appear.
Outside of the panel I have 2 buttons -- named "scrollOn" and "scrollOff", which turn the panel's scrollbar's on and off using the "Autoscroll" property (for example the "scrollOff" code I'm using is Panel1.AutoScroll = False ).
So after I run the program, I move the panel's scrollbar down a little bit with the mouse (this part is necessary to reproduce the bug). I then click the "scrollOff" button (which should make the scrollbars disappear). But when I do that, the scrollbars are not only still visible, but they "freeze up" (can't move them with the mouse anymore).
Does this happen when anyone else tries it, or is it just me?
If the former, any ideas for a work-around?