组件属性在设计时起作用,但在运行时不起作用
我正在创建一个使用面板集合和集合项的组件。
我似乎无法让颜色在运行时工作,但它们似乎在设计时工作得很好。
您可以在此处下载组件源代码:
http://www.shaneholmes.net/pasfiles/
有一个控制台 (Tcollection) 属性、状态颜色属性和一个编辑模式属性
每个控制台 (TCollectionItem) 在更改时都有一个状态属性,控制台属性根据组件的 StatusColors 属性进行更改。
当组件的 EditMode 属性设置为 true 时,您可以在运行时移动面板。
问题:为什么颜色仅在设计时起作用,而在运行时不起作用。
谢谢
I am creating a component that uses a collection and collection items of panels.
I can't seem to get the colors to work at runtime, but yet they seem to work just fine at design time.
You can download the component source code here:
http://www.shaneholmes.net/pasfiles/
There is a Consoles (Tcollection) property, status colors property, and a Edit mode property
Each console (TCollectionItem) has a status property when changed, the consoles property is changed based on the components StatusColors property.
When the components EditMode property is set to true, you can move the panels around at runtime.
Question: Why does the colors only work at designtime and not runtime.
thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我没有看过你的代码,但是“面板”+“颜色不起作用”听起来好像你忘记设置 ParentBackground 为 False。
我猜想这些颜色可能在设计时起作用,因为您通过使用 XPMan 启用了主题,而不是通过选中项目选项中的“启用运行时主题”复选框。 (只有当您拥有 D2007 或更高版本时,才可以使用第二个选项。)
I haven't looked at your code, but "panels" + "colors not working" sounds as if you've forgotten to set ParentBackground to False.
I guess that the colors probably work at design-time, because you enabled theming by using XPMan and not by checking the "Enable run-time themes" checkbox in the project options. (The second option is only available to you, if you have D2007 or later.)