博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
隔代无法继承
阅读量:7112 次
发布时间:2019-06-28

本文共 592 字,大约阅读时间需要 1 分钟。

https://www.cnblogs.com/onechen/p/6219144.html

提问:如下安装后的 TMyPanel 能在设计期时正常显示,但 TMyPanel2 在设计期时是白板,不能正常看到,为什么?

 
TMyPanel = class(TPanel)end;TMyCustomPanel = class(TPanel)TMyPanel2 = class(TMyCustomPanel)end;RegisterComponent('Test', [TMyPanel, TMyPanel2]);

可能:是隔代无法继承 Style 造成的,改成如下就可以了:

 
TMyPanel = class(TPanel)end;TMyCustomPanel = class(TPanel)end;TMyPanel2 = class(TMyCustomPanel)  protected    function GetDefaultStyleLookupName: string; override;end;function TMyPanel2.GetDefaultStyleLookupName: string;begin  Result := 'panelstyle';end;

 

转载于:https://www.cnblogs.com/marklove/p/9206791.html

你可能感兴趣的文章
《JavaScript》——DOM
查看>>
【ios开发学习 - 第二课】iOS项目文件夹结构
查看>>
【基础练习】【线性DP】codevs3027 线段覆盖2题解
查看>>
Session分布式共享 = Session + Redis + Nginx
查看>>
ES6中的迭代器(Iterator)和生成器(Generator)(二)
查看>>
beego1---beego,bee环境配置
查看>>
MinGW下编译openssl, json-c
查看>>
thinkphp跨模块调用
查看>>
Go 文件操作(创建、打开、读、写)
查看>>
JS获取周、月、季度日期
查看>>
python 异步采集,网页爬虫编写 | 一步一步学python
查看>>
Flash调用XML文件的方法
查看>>
Android ArrayAdapter 详解
查看>>
【iOS开发笔记26/50】我自己写的苹果应用程序XQViewer终于上架了,解决了一系列的问题,终于挺过来了...
查看>>
JSF---->其他标签
查看>>
Python应用01 原始Python服务器
查看>>
Add Console Application Program to the MFC Program
查看>>
Oracle中可被并行化执行的SQL操作
查看>>
新的Layout布局系统
查看>>
java链表
查看>>