Forum > LCL

is AUTOSCROLL suppose to work this way ?

(1/1)

jamie:
I found an interesting effect that appears to have been in place for some time. Was wondering if this is by design or some mishap or maybe someone's secret undocumented actions!

 If you drop a control on a form and drag size the form so it hides the control a little, normally no scrollbars appear because you don't have the "AUTOSCROLL" checked.

 Ok, so lets check that AUTISCROLL, now the scrollbars appear like they should and you can stretch the form enough so the control is now fully exposed and the scrollbars disappear, like I would expect.

 Now, shrink the form back in again and the scrollbars reappear like they should. Now uncheck the AUTOSCROLL and watch what happens.

 You will now see the scrollbars are still showing. Now stretch the form large enough to expose the control, the scrollbars are still showing and they will keep showing from this point on until you turn on the AUTOSCROLL again so they can switch off while the control is fully exposed.

 I find this hard to believe this could be by design or is this a bug ?

BTW, you can do all of this in the IDE OI and you will see the effect there. The same holds true at run time.


jamie:
I just checked my Delphi install and it works the way I would expect there..

so its a bug...

dsiders:

--- Quote from: jamie on May 05, 2021, 02:57:24 am ---I found an interesting effect that appears to have been in place for some time. Was wondering if this is by design or some mishap or maybe someone's secret undocumented actions!

 If you drop a control on a form and drag size the form so it hides the control a little, normally no scrollbars appear because you don't have the "AUTOSCROLL" checked.

 Ok, so lets check that AUTISCROLL, now the scrollbars appear like they should and you can stretch the form enough so the control is now fully exposed and the scrollbars disappear, like I would expect.

 Now, shrink the form back in again and the scrollbars reappear like they should. Now uncheck the AUTOSCROLL and watch what happens.

 You will now see the scrollbars are still showing. Now stretch the form large enough to expose the control, the scrollbars are still showing and they will keep showing from this point on until you turn on the AUTOSCROLL again so they can switch off while the control is fully exposed.

 I find this hard to believe this could be by design or is this a bug ?

BTW, you can do all of this in the IDE OI and you will see the effect there. The same holds true at run time.

--- End quote ---

When I do this, I see no issue. The scroll bar remains visible because the TControlScrollBar.Visible property is already set (when AutoScroll is changed). Change the visible property for the scroll bar is it goes away.

Are you saying the SetAutoScroll should automatically update HorzScrollBar.Visible and VertScrollBar.Visible when it is set to False?


Never mind... just read the bug report.

What I do see is that the docked form designer screws up the form dimensions when AutoScroll is toggled (it does not match its designer surface). Haven't tried it with the un-docked form designer yet.

Navigation

[0] Message Index

Go to full version