Is it possible to change the colour of the “focus selector” of a ListCtrl?

。_饼干妹妹 提交于 2019-12-25 01:51:48

问题


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".

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)?


回答1:


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.



来源:https://stackoverflow.com/questions/22767484/is-it-possible-to-change-the-colour-of-the-focus-selector-of-a-listctrl

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!