5,388
社区成员
发帖
与我相关
我的任务
分享
procedure TForm1.form2ButtonClick(Sender: TObject);
begin
form2.CheckBox1.Checked := image1.Visible;
form2.CheckBox2.Checked := image2.Visible;
if (image2.height=75) and (image2.width=75) then
form2.RadioGroup1.itemindex:=0
else
form2.RadioGroup1.ItemIndex:=1;
if (form2.ShowModal = mrOk) then
begin
Image1.Visible := form2.CheckBox1.Checked;
Image2.Visible := form2.CheckBox2.Checked;
if form2.RadioGroup1.ItemIndex=0 then
begin
image2.Left:=110;
image2.Top:=60;
image2.Height:=75;
image2.Width:=75;
end
else if form2.RadioGroup1.ItemIndex=1 then
begin
image2.Top:=15;
image2.Left:=70;
image2.Height:=150;
image2.Width:=150;
end;
end;
end;
procedure TForm1.ConfigureButtonClick(Sender: TObject);
begin
ConfigureDialog.CheckBox1.Checked := image1.Visible;
ConfigureDialog.CheckBox2.Checked := image2.Visible;
if (image2.height=75) and (image2.width=75) then
ConfigureDialog.RadioGroup1.itemindex:=0
else
ConfigureDialog.RadioGroup1.ItemIndex:=1;
if (ConfigureDialog.ShowModal = mrOk) then
begin
Image1.Visible := ConfigureDialog.CheckBox1.Checked;
Image2.Visible := ConfigureDialog.CheckBox2.Checked;
if ConfigureDialog.RadioGroup1.ItemIndex=0 then
begin
image2.Left:=110;
image2.Top:=60;
image2.Height:=75;
image2.Width:=75;
end
else if ConfigureDialog.RadioGroup1.ItemIndex=1 then
begin
image2.Top:=15;
image2.Left:=70;
image2.Height:=150;
image2.Width:=150;
end;
end;
end;