Skip to content

Instantly share code, notes, and snippets.

@Pasquina
Created August 10, 2016 17:15
Show Gist options
  • Save Pasquina/48ccd544c39e646b55e679f02467f6e9 to your computer and use it in GitHub Desktop.
Save Pasquina/48ccd544c39e646b55e679f02467f6e9 to your computer and use it in GitHub Desktop.
A test item to undershat how this works.
{ This event does 2 things: 1) it obtains the initial value of the Bottom Bound
by checking for a current saved value of zero, and 2) it sets the Bottom Bound
value if the current saved value is non-zero. The current saved value has been
set to zero when the form was created, or to some integer value when the user
has clicked the SBB button. }
procedure TfVertScrollDemo.VertScrollBox1CalcContentBounds(
Sender: TObject;
var ContentBounds: TRectF);
begin
Beep; // to let the user know this routine was entered
if not(BB > 0) then
BB := Trunc(VertScrollBox1.ContentBounds.Bottom) // save current value
else
ContentBounds.Bottom := BB; // cause Bound Bottom value to change
edHT.Text := VertScrollBox1.Height.ToString; // display the vertical scroll box height property
end;
@Pasquina
Copy link
Author

Extracted from th VertScrollDemo project.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment