ComboBox1.Items := MyStringList;
解决方案 »
- 如何編寫程序實現;下載Internet上有固定IP的主機里面的文件?
- 路径合法性判断的问题
- 动态生成控件,怎样判断控件是否被点击??
- 在数据库编程卡关
- 急,如何动态创建数据库别名
- asstring和asinteger都是干什么用的?
- 如何判断一个文件夹路径是光盘上的目录?
- 我该学VB还是DELPHI呀?
- 我用Delphi操作Word(使用WordApplication和WordDocument)做成的 OCX,怎么传出打开的文档( wordDocument)中的值
- 怎样判断treeview当前节点为treeview显示出来的第一个节点和最后一个节点?
- sql语言问题
- 如何根据数据库的表的记录建立一颗树?????
//下面是测试程序,用了一个button,一个combobox
unit Unit1;interfaceuses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;type
TForm1 = class(TForm)
ComboBox1: TComboBox;
Button1: TButton;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;var
Form1: TForm1;implementation{$R *.dfm}procedure TForm1.Button1Click(Sender: TObject);
var
strList:TStringList;
begin
strList:=TStringList.Create;
strList.Add('xxx');
combobox1.Items:=strList;
strList.Free;
end;end.
怎么做?