diff --git a/source/loaddata.dfm b/source/loaddata.dfm index 6c85ba0e..6d9a3518 100644 --- a/source/loaddata.dfm +++ b/source/loaddata.dfm @@ -17,6 +17,7 @@ object loaddataform: Tloaddataform OnClose = FormClose OnCreate = FormCreate OnDestroy = FormDestroy + OnResize = FormResize OnShow = FormShow DesignSize = ( 509 diff --git a/source/loaddata.pas b/source/loaddata.pas index fc694bc0..a3b34395 100644 --- a/source/loaddata.pas +++ b/source/loaddata.pas @@ -69,6 +69,7 @@ type procedure FormClose(Sender: TObject; var Action: TCloseAction); procedure chklistColumnsClick(Sender: TObject); procedure btnCheckAllClick(Sender: TObject); + procedure FormResize(Sender: TObject); private { Private declarations } Encoding: TEncoding; @@ -134,6 +135,24 @@ begin end; +procedure Tloaddataform.FormResize(Sender: TObject); +var + HalfWidth, RightBoxX: Integer; +begin + // Rethink width of side-by-side group boxes + HalfWidth := (ClientWidth - 3 * grpFilename.Left) div 2; + RightBoxX := HalfWidth + 2 * grpFilename.Left; + grpOptions.Width := HalfWidth; + grpDuplicates.Width := HalfWidth; + grpParseMethod.Width := HalfWidth; + grpChars.Width := HalfWidth; + grpDestination.Width := HalfWidth; + // Move right boxes to the right position + grpChars.Left := RightBoxX; + grpDestination.Left := RightBoxX; +end; + + procedure Tloaddataform.FormShow(Sender: TObject); begin FConnection := MainForm.ActiveConnection;