Recent

Author Topic: is AUTOSCROLL suppose to work this way ?  (Read 753 times)

jamie

  • Hero Member
  • *****
  • Posts: 6995
is AUTOSCROLL suppose to work this way ?
« 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.


The only true wisdom is knowing you know nothing

jamie

  • Hero Member
  • *****
  • Posts: 6995
Re: is AUTOSCROLL suppose to work this way ?
« Reply #1 on: May 05, 2021, 03:07:38 am »
I just checked my Delphi install and it works the way I would expect there..

so its a bug...
The only true wisdom is knowing you know nothing

dsiders

  • Hero Member
  • *****
  • Posts: 1453
Re: is AUTOSCROLL suppose to work this way ?
« Reply #2 on: May 05, 2021, 04:01:07 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.

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.
« Last Edit: May 05, 2021, 04:14:30 am by dsiders »
Preview the next Lazarus documentation release at: https://dsiders.gitlab.io/lazdocsnext

 

TinyPortal © 2005-2018