Page 1 of 1

Create multiple regions in real time

PostPosted: 05 Oct 2018 15:30
by legend
Hey.
I create 3 regions in real time.
And I want them to be placed strictly as they are created.

But I do not understand under what laws they place on the form.

Code: Select all
procedure TIWForm1.IWAppFormCreate(Sender: TObject);
begin
  c := TIWCGJQRegion.Create(self);
  c.Parent := self;
  c.Name := 'common';
  c.Color := clWebANTIQUEWHITE;
  c.Height := 50;
  c.Align := alTop;
  c.ZIndex := 0;
  c.TabIndex := true;
  c.TabOrder := 10;
  c.Visible := True;

  a := TIWCGJQRegion.Create(self);
  a.Parent := self;
  a.Name := 'r1';
  a.Color := clWebBLUE;
  a.Height := 50;
  a.Align := alTop;
  a.ZIndex := 0;
  a.TabIndex := true;
  a.TabOrder := 11;
  a.Visible := True;

  b := TIWCGJQRegion.Create(self);
  b.Parent := self;
  b.Name := 'r2';
  b.Color := clWebRED;
  b.Height := 100;
  b.Align := alTop;
  b.TabIndex := true;
  b.TabOrder := 12;
  b.ZIndex := 0;
  b.Visible := True;
end;


And I get this picture.

Snap_2018.10.05_17h27m10s_001_.png

Re: Create multiple regions in real time

PostPosted: 08 Oct 2018 12:29
by Alexander Bulei
Hi legend,

You can control the order by ZIndex. Please check/read some docs of intraweb.

Best Regards.

Re: Create multiple regions in real time

PostPosted: 09 Oct 2018 14:20
by legend
Hello Alexander,
Zindex allows you to control the overlap of controls.
And I would like the controls to located one by one. And for this I use the Align property: = alTop;

I created and posted the first control with the Align property: = alTop;
Then the second control with Align: = alTop and I expected to see it below the first.

But it seems that the creation of control and render are not related.

Re: Create multiple regions in real time

PostPosted: 09 Oct 2018 14:41
by Alexander Bulei
Hi legend,

Sorry, I meant the TabOrder.
Anyway, we don't control the rendering. Moreover, if you try with simple IW Regions, you will get the same result.

Best Regards.