我覆盖了TCombobox的 destructor Destroy; destructor Destroy ;override; procedure TCombobox1.Destroy;
begin
if (not (csDesigning in State)) and (Items.Count > 0) then
Items.SaveToFile('C:\S.txt');
end ;
但是,执行时报错 xxx no parent window ???
网高手解决,,, 谢谢
begin
if (not (csDesigning in State)) and (Items.Count > 0) then
Items.SaveToFile('C:\S.txt');
end ;
但是,执行时报错 xxx no parent window ???
网高手解决,,, 谢谢
解决方案 »
- 大家给推荐比较进阶的delphi
- 急,急,急,火烧眉毛!
- 如何调试delphi帮助中提供的DefianeProperties的例子?
- 关于『删帖事件查明: 代bluebohe发帖』说明二--修罗
- 简单 我要改变表格某一行的颜色 那位帮我([email protected])
- 各单位注意:本人出售源代码一套(医院管理系统)
- 如何在本机上给局域网上别的机器映射指定的目录?
- 急救!高手赐教!一个十分刺手的问题!
- 急,关于制作报表中得问题,我是菜鸟,请各位帮帮忙。(在线等待,分不够可在加。)
- 请问有什么方法可以增加可用分!好可怜,我没分了!
- 程序运行参数问题,在线等待高手解答!!!
- 请教各位对isapi开发熟悉的朋友
if (not (csDesigning in State)) and (Items.Count > 0) then
Items.SaveToFile('C:\S.txt');
inherited; //加上这句试试
end ;
combobox1.Items.SaveToFile('c:/test.txt');
不可以吗
我按照 Kevin_Lmx(繁华阅尽) 的做了(嘿嘿 不好意思忘了 Inherited),仍然不行具体报错的
信息为:
EInvalidOperation with message 'Control 'MRCombobox1' has no parent window
我的本意时,自己重构一个TComobox 组件类,改组件类能够在即将被释放时将自身的Items 保存
到文件中 还望大家多多帮组
应该不会吧,如果能够触发 Destroy 析构函数,一定时已经创建了实例