是否可以更改“焦点选择器"的颜色?一个 ListCtrl? [英] Is it possible to change the colour of the "focus selector" of a ListCtrl?

查看:30
本文介绍了是否可以更改“焦点选择器"的颜色?一个 ListCtrl?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在 Mozilla Thunderbird 邮件中,您可以为列表中的项目指定颜色.焦点选择器"通常具有由操作系统上的窗口主题定义的光标颜色".现在,当您在 Thunderbird 中选择一个有颜色的项目时,焦点光标会相应地更改颜色.即表示该项目有颜色.否则,用户只能通过移开焦点选择器"来看到此特定项目具有颜色.

In Mozilla Thunderbird mail you can assing items in a list a colour. The "focus selector" usually has the "cursor colour" that is defined by the window theme on your OS. Now, when you select a coloured item in Thunderbird, the focus cursor changes colour accordingly. That is to indicate that this item has a colour. Otherwise the user could only see that this particular item has a colour by moving away the "focus selector".

现在,这在 WxWindows、WxListCtrl 中可行吗?除了改变字体颜色(SetForegroundColour)和项目的背景(SetbackgroundColour,通常是白色)?

Now, is this possible in WxWindows, a WxListCtrl? Apart from changing the font-colour (SetForegroundColour) and the item's background (SetbackgroundColour, which is usually white)?

推荐答案

wxPython 工具包尽可能地封装了操作系统的原生小部件.我不相信任何本机小部件都支持光标颜色"的自定义颜色.您可能想看看 UltimateListCtrl.我不确定它是否具有开箱即用的功能,但它是一个纯 Python 列表控件,我相信您可以更轻松地修补它以添加该功能.

The wxPython toolkit wraps the native widget of the OS as much as possible. I don't believe any native widgets support custom colors for the "cursor color". You might want to take a look at the UltimateListCtrl. I'm not sure if that has this feature out of the box, but it is a pure Python list control and I'm sure you could patch it much more easily to add that functionality.

这篇关于是否可以更改“焦点选择器"的颜色?一个 ListCtrl?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆