Hi,
I'm displaying search results in a listview control and I want to highlight or at least make the searched text bold in the listview items and subitems. Can anyone help please?
Thanks,
Ruki76
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Rukshan SalgadoPosted Apr 10, 2006, 5:00 AM
Thank you for the tips, but I'm a bit lost with the code since it's done for a Treeview.
I appreciate if U could help me further on this.
Thanks
Craig MurphyPosted Apr 7, 2006, 4:58 AM
More code then, sorry!
Read more about what's required here:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/commctls/custdraw/custdraw.asp
I realise you need a ListView, but there's a TreeView implementation here:
http://www.codeproject.com/vb/net/CustomDrawTreeview.asp
It might give you some pointers that help...
Rukshan SalgadoPosted Apr 7, 2006, 4:20 AM
Thanks for the tip, but I'm still using ver 1.1. Let me know if U come across something else.
Craig MurphyPosted Apr 6, 2006, 4:37 PM
It's a little bit more than a few lines of code, but there is a good example here:
http://msdn2.microsoft.com/en-us/library/system.windows.forms.listview.ownerdraw(VS.80).aspx
HTH
Rukshan SalgadoPosted Apr 6, 2006, 12:24 PM
Jayadev NairPosted Apr 6, 2006, 11:00 AM
Regards!