![]() |
Desktop Development »
Combo & List Boxes »
General
Beginner
Dynamically Highlight Elements in a List ControlBy Coleman BrumleyUse the custom draw features of a List Control to dynamically find and hightlight items. |
VC6Win2K, MFC, Dev
|
|
Advanced Search Add to IE Search |
|
|
|
||||||||||||||||

It seems more and more like my projects revolve around the List Control in some form or another. I also seem to be using CodeProject more and more to find out how to do things in my code.
One day, I came across Michael Dunn's excellent article Neat Stuff to do in List Controls Using Custom Draw and it got me to thinking about how to do some really functional stuff with a list control.
I had recently done a project where certain attributes were displayed in a list control. And, at the time, I thought it would be neat if I could color text in a column based on certain criteria, specifically, the text in the cell. Well, due to time constraints, that feature never made it into the project.
But, since then, I've had time to revisit, and have come up with that functionality in this little application.
Simply type in a name in the edit box, and if the name is found in the List Control, it's highlighted yellow and it's text is changed to red.
The specifics of Custom Draw in a List Control are presented in Michael's article, and I've tried to document the code nicely.
Enjoy!
| You must Sign In to use this message board. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
General
News
Question
Answer
Joke
Rant
Admin
|
PermaLink |
Privacy |
Terms of Use
Last Updated: 20 Aug 2001 Editor: Nishant Sivakumar |
Copyright 2001 by Coleman Brumley Everything else Copyright © CodeProject, 1999-2009 Web18 | Advertise on the Code Project |