Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 4 of 4 total
Thread Responsive panel / grids
Thu, Dec 12 2019 11:00 AMPermanent Link

Huseyin Aliz

myBiss ApS

Avatar

Hi All,

If i want to make a form with 2 panels, lets say left and right panels
and width of these panels should be equal no matter what the form width
changes to (browser resize). The panels contains a grid each and if grid
width could be resized together with the panels i would be happy Smile

Regards,
Huseyin
Thu, Dec 12 2019 1:49 PMPermanent Link

Walter Matte

Tactical Business Corporation

OnResize if you set the size of the LEFT Panel in code, the other panel would take care of itself



Left Panel

Layout
- Position Top Left
- Stretch - Bottom
- Consumption - Right
Layout Order 0

Right Panel
- Position Top Left
- Stretch - Bottom Right
Layout Order 1


Put a Grid into each panel
Grid 1 and 2
Layout
- Position Top Left
- Stretch - Bottom Right


OnResize of Form/Dialog


procedure TForm1.Form1Size(Sender: TObject);
begin
 pnlLeft.Width := trunc(self.width /2);
end;



Walter
Thu, Dec 12 2019 1:54 PMPermanent Link

Walter Matte

Tactical Business Corporation

See attached

Walter Matte wrote:

OnResize if you set the size of the LEFT Panel in code, the other panel would take care of itself



Left Panel

Layout
- Position Top Left
- Stretch - Bottom
- Consumption - Right
Layout Order 0

Right Panel
- Position Top Left
- Stretch - Bottom Right
Layout Order 1


Put a Grid into each panel
Grid 1 and 2
Layout
- Position Top Left
- Stretch - Bottom Right


OnResize of Form/Dialog


procedure TForm1.Form1Size(Sender: TObject);
begin
 pnlLeft.Width := trunc(self.width /2);
end;



Walter



Attachments: PanelTest.zip
Thu, Dec 12 2019 5:29 PMPermanent Link

Huseyin Aliz

myBiss ApS

Avatar

Walter,

Thanks, looks like just what I wanted Smile

Regards,
Huseyin

Den 12-12-2019 kl. 19:54 skrev Walter Matte:
> See attached
>
> Walter Matte wrote:
>
> OnResize if you set the size of the LEFT Panel in code, the other panel would take care of itself
>
>
>
> Left Panel
>
> Layout
> - Position Top Left
> - Stretch - Bottom
> - Consumption - Right
> Layout Order 0
>
> Right Panel
> - Position Top Left
> - Stretch - Bottom Right
> Layout Order 1
>
>
> Put a Grid into each panel
> Grid 1 and 2
> Layout
> - Position Top Left
> - Stretch - Bottom Right
>
>
> OnResize of Form/Dialog
>
>
> procedure TForm1.Form1Size(Sender: TObject);
> begin
>    pnlLeft.Width := trunc(self.width /2);
> end;
>
>
>
> Walter
>
Image