L
lily
Unregistered / Unconfirmed
GUEST, unregistred user!
本人在程序中需要在生成窗体时动态生成combobox的items,于是编了如下的
FormCreate过程,但在运行中设了断点,发觉FormCreate过程并没有运行,不
知道错在哪里,劳烦各位指教一下。
procedure TForm1.FormCreate(Sender:Tobject);
var
mc:string;
begin
QrySpmc.prepare;
QrySpmc.Open;
QrySpmc.First;
while not QrySpmc.eof do
begin
mc:=QrySpmc.fieldbyname('spmc').asstring;
ComboBox1.Items.Add(mc);
QrySpmc.Next;
end;
end;
FormCreate过程,但在运行中设了断点,发觉FormCreate过程并没有运行,不
知道错在哪里,劳烦各位指教一下。
procedure TForm1.FormCreate(Sender:Tobject);
var
mc:string;
begin
QrySpmc.prepare;
QrySpmc.Open;
QrySpmc.First;
while not QrySpmc.eof do
begin
mc:=QrySpmc.fieldbyname('spmc').asstring;
ComboBox1.Items.Add(mc);
QrySpmc.Next;
end;
end;