将 TButtonedEdit 图像与 TComboBox 默认图像匹配
我的应用程序使用标准 TComboBoxes 和 TButtonedEdits 来生成具有更复杂下拉面板的控件。我希望这两个控件看起来相同。特别是,我希望 TButtonedEdits 上的图像与 TComboBoxes 上的图像相同,无论程序在当前或未来的操作系统上运行(也就是说,假设该图像由操作系统决定,而不是 Delphi )。
我假设我必须在运行时将向 TComboBox 提供图像的资源安装到 TImageList 中,以使其可供我的 TButtonedEdits 使用。如何找到并提取该资源?
My application uses standard TComboBoxes and also TButtonedEdits to produce controls with more complex drop-down panels. I would like the two controls to look the same. In particular, I would like image on my TButtonedEdits to be identical to the image on the TComboBoxes regardless of which current or future operating system the program is run on (that is, assuming that this image is determined by the operating system and not be Delphi).
I assume that I will have to install, at runtime, the resource providing the image to TComboBox into a TImageList to make it available to my TButtonedEdits. How do I locate and extract that resource?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以使用主题引擎自己绘制按钮 - 对于初学者来说,尝试这样的操作:(
改编自线程 “组合框中的 Windows 主题”(位于 Embarcadero 论坛)。
Mike Lischke 的“Windows XP 主题资源管理器” 可以帮助您找到正确的“元素”和“细节”。看看这个SO线程。
You can use the theme engine to draw the button yourself - try something like this for starters:
(adapted from the thread "Windows themes in combobox" in the Embarcadero forums).
Mike Lischke's "Windows XP Theme Explorer" can help you to find the right "Elements" and "Details". And have a look at this SO thread.