Ok! That got rid of the run time error. And I'm gald it was really easy to fix. However, now when I run the program, nothing shows up on the form.
unit main;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, DBGrids,
DbCtrls, Grids, StdCtrls, adscnnct, adstable, db, ShellAPI;
type
{ TForm1 }
TForm1 = class(TForm)
private
{ private declarations }
public
{ public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.lfm}
Var
cba: array[1..10] of TComboBox;
I: integer;
begin
for I:=1 to 10 do
begin
cba[I]:=TComboBox.Create(Form1);
with cba[I] do
begin
visible:=true;
enabled:=true;
Left := 55;
Height := 23;
Top := 55+10*I;
Width := 118;
ItemHeight := 15;
TabOrder := I+1;
Text := 'CB'+IntToStr(I);
Name := 'CB'+IntToStr(I);
end;
end;
end.
To me, it looks like there should be 10 combo boxes running down the form. Each 10 pixels below the last.
Thanks
Knipfty