Recent

Author Topic: Revert properties to default values  (Read 430 times)

LemonParty

  • Sr. Member
  • ****
  • Posts: 353
Revert properties to default values
« on: August 13, 2025, 11:37:01 pm »
Hello.

I use this procedure for setting one component below another:
Code: Pascal  [Select][+][-]
  1. procedure PlaceBelow(A, B: TWinControl);
  2. begin
  3.   B.AnchorSide[akTop].Side:= asrBottom;
  4.   B.AnchorSide[akTop].Control:= A;
  5.   B.Anchors:= B.Anchors + [akTop] - [akBottom];
  6.   B.BorderSpacing.Top:= CGap;
  7. end;
  8.  
I need to revert back to default properties so components are no longer connected in a chain.
Lazarus v. 4.99. FPC v. 3.3.1. Windows 11

wp

  • Hero Member
  • *****
  • Posts: 13195
Re: Revert properties to default values
« Reply #1 on: August 13, 2025, 11:56:02 pm »
Switch the Control.AnchorSideXXXX.Control to nil, and the control will be moving freely (at this side)

 

TinyPortal © 2005-2018