Sampron
Full Member | Редактировать | Профиль | Сообщение | Цитировать | Сообщить модератору unit Unit1; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, ExtCtrls, StdCtrls; type TForm1 = class(TForm) Panel1: TPanel; Panel2: TPanel; Panel3: TPanel; Panel4: TPanel; procedure PanelSize; procedure FormCreate(Sender: TObject); procedure FormResize(Sender: TObject); end; var Form1: TForm1; implementation {$R *.dfm} procedure TForm1.PanelSize; begin Panel1.SetBounds(0,0,Form1.ClientWidth div 2,Form1.ClientHeight div 2); Panel2.SetBounds(Panel1.Width,0,Form1.ClientWidth div 2,Form1.ClientHeight div 2); Panel3.SetBounds(0,Panel1.Height,Form1.ClientWidth div 2,Form1.ClientHeight div 2); Panel4.SetBounds(Panel3.Width,Panel2.Height,Form1.ClientWidth div 2,Form1.ClientHeight div 2); end; procedure TForm1.FormCreate(Sender: TObject); begin PanelSize; end; procedure TForm1.FormResize(Sender: TObject); begin PanelSize; end; end. |