Skip to content
GitLab
    • Why GitLab
    • Pricing
    • Contact Sales
    • Explore
  • Why GitLab
  • Pricing
  • Contact Sales
  • Explore
  • Sign in
  • Get free trial
  • FPC
  • Lazarus Lazarus
  • LazarusLazarus
  • Issues
  • #38838

ScrollInView for TscrollingWinControl or scrollbox does not calculate stacked controls.

Original Reporter info from Mantis: jamie @jamie
  • Reporter name: jamie philbrook

Description:

if you place a panel on a scrollbox and place some controls inside that panel, the parented controls of the panel uses its offset of the Panel for the calculations to scroll instead of cycling backwards to the calling scrolling window control.

In short the end results is you don't see the parented controls of the panel scroll in view properly because the bounds of the panel is not being added to the offset of the child controls.

Please refer to this thread where I took the existing ScrollInView Code and modified it for the purpose of a test..
https://forum.lazarus.freepascal.org/index.php/topic,54354.0.html

Steps to reproduce:

start with a scrollbox

drop a panel inside it but make sure the top is not at the top of the scrollbox

place a button inside the panel

shrink the scrollbox so the button is hidden from view..

execute the ScrollBox.ScrollInView and watch what happens.

Mantis conversion info:

  • Mantis ID: 38838
  • Build: all of them, Trunk too.
  • Version: 2.0.12
  • Fixed in revision: 65078 (#f1924225)
Assignee
Assign to
Time tracking