2021年6月17日

inherited Create(AOwner) 和inherited区别 .

摘要: inherited; 以本方法名在父类中调用,没有明确指定参数,但把当前使用的参数传给继承下来的方法。 inherited Create(AOwner) ; inherited Create是指定调用父类的Create方法,当然你也可以inherited Destory 阅读全文

posted @ 2021-06-17 10:28 癫狂编程 阅读(109) 评论(0) 推荐(0) 编辑

Delphi 之Inherited详解

摘要: inherited就是调用祖先类的函数,如果不带参数就是默认调用同名函数如果带参数则表明子类中的函数个数可能比祖先类要多取其中的几个参数传过去例如祖先类有个函数 Create(AName:string);子类有个函数 Create(AName:string;AComponent:TObject);o 阅读全文

posted @ 2021-06-17 10:26 癫狂编程 阅读(794) 评论(0) 推荐(0) 编辑

delphi中的Owner和Parent的区别

摘要: Owner为创建者,Parent为容器 (创建的对象会拥有Owner的属性,然后放在Parent上显示出来)他们的类型不同, Owner为TComponent【元件(如窗体、一些控件)】,Parent为TWinControl【窗体控件(如窗体里面的控件panel等)】。 Parent属性是指构件的包 阅读全文

posted @ 2021-06-17 10:25 癫狂编程 阅读(430) 评论(0) 推荐(0) 编辑

这就是Delphi,稀里又糊涂:constructor create(AOwner:Tcomponent);override;(33分)

摘要: Constructor TcountButton.create(AOwner:Tcomponent);begininherited create(Aowner);inc(TotBtns);end;请解释一下这里Aowner的用法 AOwner指明这个控件的拥有者. 在AOwner释放时会自动释放自己 阅读全文

posted @ 2021-06-17 10:24 癫狂编程 阅读(451) 评论(0) 推荐(1) 编辑

导航

好的代码像粥一样,都是用时间熬出来的