From 380ea972801ad12ff45cb0f141230abb37d2e41e Mon Sep 17 00:00:00 2001 From: Anthony Walter Date: Sat, 1 Jun 2019 10:31:15 -0400 Subject: [PATCH] Added size constraints --- main.lfm | 13 ++++++++----- main.pas | 2 ++ 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/main.lfm b/main.lfm index 3cdd666..56f40ab 100644 --- a/main.lfm +++ b/main.lfm @@ -10,7 +10,6 @@ object BackupForm: TBackupForm OnCreate = FormCreate OnShow = FormShow Position = poScreenCenter - LCLVersion = '2.0.2.0' object AddSourceButton: TButton Left = 8 Height = 25 @@ -48,9 +47,9 @@ object BackupForm: TBackupForm end object SourceLabel: TLabel Left = 8 - Height = 16 + Height = 17 Top = 8 - Width = 156 + Width = 168 Caption = 'Select folders to backup:' ParentColor = False end @@ -61,7 +60,9 @@ object BackupForm: TBackupForm Width = 256 ItemHeight = 0 OnDblClick = BoxDblClick + ScrollWidth = 254 TabOrder = 2 + TopIndex = -1 end object RemoveSourceButton: TButton Left = 8 @@ -74,9 +75,9 @@ object BackupForm: TBackupForm end object DestLabel: TLabel Left = 272 - Height = 16 + Height = 17 Top = 8 - Width = 217 + Width = 233 Caption = 'Select location to use for backups:' ParentColor = False end @@ -96,7 +97,9 @@ object BackupForm: TBackupForm Width = 256 ItemHeight = 0 OnDblClick = BoxDblClick + ScrollWidth = 254 TabOrder = 6 + TopIndex = -1 end object RemoveDestButton: TButton Left = 272 diff --git a/main.pas b/main.pas index 4b2e81f..b200a36 100644 --- a/main.pas +++ b/main.pas @@ -119,6 +119,8 @@ procedure TBackupForm.FormCreate(Sender: TObject); {$endif} ClientWidth := Bevel.Width + 16; ClientHeight := CloseButton.Top + CloseButton.Height + 8; + Constraints.MinWidth := Width - 100; + Constraints.MinHeight := Height - 200; ProgressBar.Top := CloseButton.Top + (CloseButton.Height - ProgressBar.Height) div 2 + 1; SourceTree.Anchors := [akLeft, akTop, akBottom]; AddSourceButton.Anchors := [akLeft, akBottom];