在的WinForms ListView的文本选择部分 [英] winforms select part of text in listview

查看:139
本文介绍了在的WinForms ListView的文本选择部分的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Item.subItemsCollection列表视图中选择文本的一部分,例如lookingfor方法
文本

I am lookingfor method to select part of text in Item.subItemsCollection in listview e.g. text of

     item.subitem[0].text = "thats text";

但我想强调(CHAGE颜色)只为字母ATS中的这就是二字。
谁能帮我?

but i want to highlight (chage color) only for letters "ats" in "thats" word. Can anyone help me?

推荐答案

当然是有没有简单的方法来做到这一点,但你可以使用别人的工作:)

There is certainly no easy way to do this, but you can use someone else's work :)

ObjectListView - 围绕.NET ListView控件一个开放源码的包装 - 有一个 HighlightTextRenderer 这将这样做。 你可以了解一下这里

ObjectListView -- an open source wrapper around a .NET ListView control -- has a HighlightTextRenderer which will do exactly that. Read about it here.

下面,它是突出儿:

这篇关于在的WinForms ListView的文本选择部分的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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