![]() | ![]() Products ![]() ![]() ![]() ![]() |
Home » Technical Support » Elevate Web Builder Technical Support » Support Forums » Elevate Web Builder General » View Thread |
Messages 1 to 3 of 3 total |
![]() |
Fri, Jan 12 2018 3:10 PM | Permanent Link |
Mario Enríquez Open Consult | Hi folks,
I need to dynamically add child panels inside a master panel, once the right edge its reached, the next child should start another row starting at the left edge. It appears I'm almost there, but couldn't figure out how to start a new row. Been playing around with Reset property of the Layout but haven't found a solution yet. Here's a snippet of the code: procedure TForm1.btnAgregarClick(Sender: TObject); var pnEtapa : TPanel; begin pnEtapa := TPanel.Create(pnlBoard); pnEtapa.Background.Fill.Color := clRed; pnEtapa.Width := 250; pnEtapa.Height := 250; pnEtapa.Margins.Bottom := 10; pnEtapa.Margins.Left := 10; pnEtapa.Margins.Right := 10; pnEtapa.Margins.Top := 10; pnEtapa.LayoutOrder := FEtapaCount; pnEtapa.Layout.Position := lpLeft; pnEtapa.Layout.Consumption := lcRight; if FRowCount = 2 then begin pnEtapa.Layout.Reset := True; FRowCount := 0; end else begin pnEtapa.Layout.Reset := False; Inc(FRowCount); end; Inc(FEtapaCount); end; procedure TForm1.Form1Show(Sender: TObject); begin FRowCount := 0; FEtapaCount := 2; end; Any advice? Regards, Mario |
Fri, Jan 12 2018 4:41 PM | Permanent Link |
Uli Becker | Mario,
> It appears I'm almost there, but couldn't figure out how to start a new row. Been playing around with Reset property of the Layout but haven't found a solution yet. Let EWB do this job for you ![]() What you want is the Layout.Overflow property: procedure TForm1.btnAgregarClick(Sender: TObject); var pnEtapa : TPanel; begin pnEtapa := TPanel.Create(BasicPanel1); pnEtapa.Background.Fill.Color := clRed; pnEtapa.Width := 250; pnEtapa.Height := 250; pnEtapa.Margins.Bottom := 10; pnEtapa.Margins.Left := 10; pnEtapa.Margins.Right := 10; pnEtapa.Margins.Top := 10; pnEtapa.Layout.Position := lpTopLeft; pnEtapa.Layout.Consumption := lcRight; pnEtapa.Layout.Overflow := loBottom; <-------------- end; Uli |
Fri, Jan 12 2018 5:11 PM | Permanent Link |
Mario Enríquez Open Consult | Thank you very much Uli, that did the trick!
Regards, Mario |
This web page was last updated on Saturday, June 3, 2023 at 10:17 AM | Privacy Policy![]() © 2023 Elevate Software, Inc. All Rights Reserved Questions or comments ? ![]() |