首页 相关文章 在BCB中使用VCL控件数组2

在BCB中使用VCL控件数组2

  我的《BCB中使用VCL控件数组》中,提到了用TList来实现时无法释放资源的问题,结果今天就得到了答案,邬彦华等等网友都指教了TList实现的释放方法,定义代码同前文:

  

for (int i=1;i=ButtonCount;i++)
{
TSpeedButton *spdBtn=new TSpeedButton(this);
spdBtn-Parent=ScrollBox;//指定父控件
spdBtn-Caption=IntToStr(i);
spdBtn-Width=80;
spdBtn-Height=80;
spdBtn-OnClick=ButtonClick;
spdBtn-Left=intLeft;
spdBtn-Top=intTop;
spdBtn-GroupIndex=1;
spdBtn-Flat=true;
intLeft=intLeft+80+intSpace;
if (i%LineCount==0)
{
intTop=intTop+80+intSpace;
intLeft=intSpace;[ 查看全文 ]

2016-02-19 标签:

在BCB中使用VCL控件数组2的相关文章

手机页面
收藏网站 回到头部