TFrame 组件:找不到资源
工具:Delphi 6 Pro
我在主组件包中创建了一个新组件,它是 TFrame 的后代,使用 Component ->;新的组件选项。当我尝试在设计期间在表单上绘制组件时,出现“未找到资源 {组件类名称}”错误。我尝试将行 {$R *.dfm} 添加到“实现”声明之后的组件单元中,但这不起作用。 (我首先重新编译了主机包)。我什至尝试从另一个框架复制 DFM,然后重命名所有内容以与主机同步,包括 DFM 文件名本身。那也没用。
我希望将 TFrame 后代作为组件,而不仅仅是创建新的 TFrame 变体,因为我想向其添加在设计时显示在属性编辑器中的属性。有办法让这项工作发挥作用吗?
提前致谢。
Tool: Delphi 6 Pro
I created a new component in my main components package that is a descendant of TFrame using the Component -> New Component option. When I try to draw the component on a form during design time I get a "Resource {component class name} not found" error. I tried adding the line {$R *.dfm} to the component unit just after the "implementation" declaration and that didn't work. (I did recompile the host package first). I even tried copying over a DFM from another frame and then renaming everything to sync up with the main unit including the DFM file name itself. That didn't work either.
I want to have the TFrame descendant as a Component instead of just creating a new TFrame variant because I want to add properties to it that show up in the Property Editor at design time. Is there a way to make this work?
Thanks in advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论