Delphi ComboBox1DropDown 生成动态下拉列表


本文整理自网络,侵删。

 
描述
当您下拉列表时,此示例用一组打开的表单填充组合框的列表。每次下拉列表时都会重新生成列表,因此,如果应用程序打开或关闭表单,则组合框保持最新状态。

procedure TForm1.ComboBox1DropDown(Sender: TObject);
var
  I: Integer;
begin
  with ComboBox1 do
  begin
    Items.BeginUpdate; { Prevent repaints until done. }
    Items.Clear; { Empty the list of any old values. }
    for I := 0 to Screen.CustomFormCount - 1 do
    begin
   Items.Add('www.delphitop.com');
    Items.EndUpdate; {Reenable painting. }
  end;

end;

相关阅读 >>

Delphi 10.3.1 android沉浸式透明状态栏

Delphi 关于使用access中带参数的查询的用法

Delphi 简单实习窗体靠边隐藏

Delphi case of

trichedit 是一个标准的rtf编辑器

windows7下使用Delphi7的方法

Delphi 暴力搜索api

Delphi中如何设置更改编译生成的exe文件的保存位置

Delphi 编写的一个感染文件夹的小病毒

Delphi 大小写字符串转换

更多相关阅读请进入《Delphi》频道 >>



打赏

取消

感谢您的支持,我会继续努力的!

扫码支持
扫码打赏,您说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦

分享从这里开始,精彩与您同在

评论

管理员已关闭评论功能...