Prevent rearrangement of my visual controls during runtime with dynamic RESIZING of TLayout Control in Delphi Firemonkey [duplicate]


Is there a way that I can prevent re-arrangement of my visual controls during runtime with dynamic RESIZING of some of the controls like TLayout/TVertScrollBox in my case?
Here’s the controls contained in my form:
TabItem1 // select and filter a meta to be to shown in TabItem2
TabItem2 // select and filter an item to be shown in TabItem3
TabItem3 // provide the details of the selecte item from TabItem2
TLayout2 // get its height from TListView item(record) count
TListView // dynamically based on item(record) count provide the height TLayout2

Based on the above setup, the size of TLayout1 is dependent on the record count (fdquery.recordcount) to be shown in TListView.
Upon running the program, the controls changed its position like the TLabel2 will move to the bottom and all others arbitrarily.
I was given the answers here and another one here but it discussed about TPanel created at runtime. I am not really sure if these are relevant to my questions. Because I don’t use TPanel controls and its being created at runtime. Mine is create at design time except that some controls are dynamically resizing at runtime.
I found another solution from youtube of Alister Christie to create a procedure below:
procedure TformMain.OrderControls;
TImage.Align.alBottom := 0; //Alister sample is Button1.Left := 0;
TLabel1.Align.alBottom := 0;
TLabel2.Align.alBottom := 0;
TLayout2.Align.alBottom := 0;
TLabel3.Align.alBottom := 0;
TListView.Align.alBottom := 0;

procedure TfromMain.TVertScrollBox1ItemClick(const Sender: TObject; const AItem: TListViewItem);

But, I am getting the error on alBottom as it is already deprecated. I tried Align.Bottom and this time it is not recognized.
My issue is getting deeper here.
Going back, all I want is how to make my controls fix to its assigned location even if my other controls are dynamically resizing at runtime.

Comments are closed.