set MacroGroupBox bounds on form creation

git-svn-id: trunk@5555 -
This commit is contained in:
vincents 2004-06-11 20:51:33 +00:00
parent 824f2101de
commit f58d528f51

View File

@ -109,6 +109,8 @@ type
procedure SetMacroList(const AValue: TTransferMacroList); procedure SetMacroList(const AValue: TTransferMacroList);
procedure SetRunFileIfActive(const AValue: boolean); procedure SetRunFileIfActive(const AValue: boolean);
procedure UpdateCaption; procedure UpdateCaption;
procedure UpdateBuildMacroSelectionBoxBounds;
procedure UpdateRunMacroSelectionBoxBounds;
procedure ReadDirectiveList; procedure ReadDirectiveList;
procedure WriteDirectiveList; procedure WriteDirectiveList;
public public
@ -491,20 +493,8 @@ begin
end; end;
procedure TBuildFileDialog.BuildPageRESIZE(Sender: TObject); procedure TBuildFileDialog.BuildPageRESIZE(Sender: TObject);
var
x: Integer;
y: Integer;
w: Integer;
h: Integer;
begin begin
if (BuildMacroSelectionBox=nil) or (BuildScanForMakeMsgCheckbox=nil) then UpdateBuildMacroSelectionBoxBounds;
exit;
x:=3;
y:=BuildScanForMakeMsgCheckbox.Top+BuildScanForMakeMsgCheckbox.Height+5;
w:=BuildPage.ClientWidth-2*x;
h:=BuildPage.ClientHeight-y-x;
BuildMacroSelectionBox.SetBounds(x,y,w,h);
end; end;
procedure TBuildFileDialog.OkButtonCLICK(Sender: TObject); procedure TBuildFileDialog.OkButtonCLICK(Sender: TObject);
@ -524,18 +514,8 @@ begin
end; end;
procedure TBuildFileDialog.RunPageRESIZE(Sender: TObject); procedure TBuildFileDialog.RunPageRESIZE(Sender: TObject);
var
x: Integer;
y: Integer;
w: Integer;
h: Integer;
begin begin
if (RunCommandGroupbox=nil) or (RunMacroSelectionBox=nil) then exit; UpdateRunMacroSelectionBoxBounds;
x:=3;
y:=RunCommandGroupbox.Top+RunCommandGroupbox.Height+5;
w:=RunPage.ClientWidth-2*x;
h:=RunPage.ClientHeight-y-x;
RunMacroSelectionBox.SetBounds(x,y,w,h);
end; end;
procedure TBuildFileDialog.BuildFileDialogCREATE(Sender: TObject); procedure TBuildFileDialog.BuildFileDialogCREATE(Sender: TObject);
@ -549,6 +529,7 @@ begin
Caption:='Macros'; Caption:='Macros';
OnAddMacro:=@BuildMacroSelectionBoxAddMacro; OnAddMacro:=@BuildMacroSelectionBoxAddMacro;
end; end;
UpdateBuildMacroSelectionBoxBounds;
RunMacroSelectionBox:=TMacroSelectionBox.Create(Self); RunMacroSelectionBox:=TMacroSelectionBox.Create(Self);
with RunMacroSelectionBox do begin with RunMacroSelectionBox do begin
@ -557,6 +538,7 @@ begin
Caption:='Macros'; Caption:='Macros';
OnAddMacro:=@RunMacroSelectionBoxAddMacro; OnAddMacro:=@RunMacroSelectionBoxAddMacro;
end; end;
UpdateRunMacroSelectionBoxBounds;
end; end;
procedure TBuildFileDialog.BuildBrowseWorkDirButtonCLICK(Sender: TObject); procedure TBuildFileDialog.BuildBrowseWorkDirButtonCLICK(Sender: TObject);
@ -637,6 +619,38 @@ begin
Caption:='Configure Build '+Filename; Caption:='Configure Build '+Filename;
end; end;
procedure TBuildFileDialog.UpdateBuildMacroSelectionBoxBounds;
var
x: Integer;
y: Integer;
w: Integer;
h: Integer;
begin
if (BuildMacroSelectionBox=nil) or (BuildScanForMakeMsgCheckbox=nil) then
exit;
x:=3;
y:=BuildScanForMakeMsgCheckbox.Top+BuildScanForMakeMsgCheckbox.Height+5;
w:=BuildPage.ClientWidth-2*x;
h:=BuildPage.ClientHeight-y-x;
BuildMacroSelectionBox.SetBounds(x,y,w,h);
end;
procedure TBuildFileDialog.UpdateRunMacroSelectionBoxBounds;
var
x: Integer;
y: Integer;
w: Integer;
h: Integer;
begin
if (RunCommandGroupbox=nil) or (RunMacroSelectionBox=nil) then exit;
x:=3;
y:=RunCommandGroupbox.Top+RunCommandGroupbox.Height+5;
w:=RunPage.ClientWidth-2*x;
h:=RunPage.ClientHeight-y-x;
RunMacroSelectionBox.SetBounds(x,y,w,h);
end;
procedure TBuildFileDialog.ReadDirectiveList; procedure TBuildFileDialog.ReadDirectiveList;
var var
BuildWorkingDir: String; BuildWorkingDir: String;