TFrame 组件:找不到资源

发布于 2024-09-03 18:51:22 字数 336 浏览 3 评论 0原文

工具: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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文