tcom完全没有必要作为参数传递进来。如果要动态创建得话,试一试这样行不行
procedure TForm1.pcptcom(var tcom: tcombobox;comname:string;comtop:integer; strlist: Tstringlist;
haschange: boolean; changename: TnotifyEvent);
var
acom:TComboBox;
begin
aCom:=tComboBox.create(nil);
tcom:=acom;
end;
procedure TForm1.pcptcom(var tcom: tcombobox;comname:string;comtop:integer; strlist: Tstringlist;
haschange: boolean; changename: TnotifyEvent);
var
acom:TComboBox;
begin
aCom:=tComboBox.create(nil);
tcom:=acom;
end;
解决方案 »
- 如何产生500个随机数
- idFTP 上传续传功能的实现/
- 那位大虾给我写个小算法,100分献上,不够在给!~
- 谁有DELPHI中对USB口进行操作的那个usb.pas文件?
- 怎么使listbox 和 DBGrid 指定的行用自己喜欢的颜色显示?
- 如何找出局域网中安装了我的应用程序服务器的所有机器
- delphi 访问unix informix 遇到的一个大BUG
- 各位大大,有没有AUTOCAD文件的控件啊,最近我要写一个数据库,对公司产品开发数据进行管理
- Delphi6数据手工输入
- 紧急!!!谁能帮我发一个有用的例子过来,我马上给他分!!!
- 如何动态的改变窗台名称。为什么我用条件语句DELPHI要我引用自身单元,引用后他又报不能引用?
- 关于设置MouseHook的问题
//or
label1.Caption := (com1 as tcombobox).Text
caption属性无法直接接受TStrings类型数据的赋值
你可以:
1.
var
i:integer;
begin
for i:=0 to com1.strlst.Count do
label1.Caption:= Label1.Caption+ com1.strlst[i];2.
label1.Caption:= string(com1.Text);3.if com1.text is string
then label1.Caption:= com1.text;等等以及你是用的方法都是安全的类型转换