C
callxuelin
Unregistered / Unconfirmed
GUEST, unregistred user!
代码:
Str:array[1..15] of String;
procedure TForm4.FormShow(Sender: TObject);
begin
Str[1]:=ComboBox1.Text ;
Str[2]:=ComboBox2.Text ;
Form4.Button1.SetFocus
end;
Procedure TForm4.ComboBox1Click(Sender: TObject);
begin
if Str[1]<>ComboBox1.Text then
begin
if (MessageDlg('整流'+Label8.caption+'由 '+Str[1]+' 转换为'+#13+ComboBox1.Text
+',是否执行?',mtconfirmation,[mbok,mbcancel],0)=mrok) then
begin
Str[1]:=ComboBox1.Text ;
//修改数据库内容
end
else
begin
ComboBox1.Text:=Str[1];
//修改数据库内容
end;
end;
end;
运行结果,在ComboBox1选择时点Cancle结果还是我选的那个值,