Is there a way to put images or multiple colors in a wxListCtrl row? Or maybe there is some other type of list control that allows this. I've seen programs where they have what look like normal lists, but somehow different colors throughout a row, with icons also. I was wanting to do the same thing. Here is an example:
http://duke3d.org/example.png
Rich List Control? Topic is solved
Rich List Control?
Last edited by miclus on Fri Oct 02, 2009 5:57 am, edited 1 time in total.
Hmmm. I talked to the author, and he said he draws them on there manually. For instance, the smiley face with shades is the code B}. He said the B} is actually in the list, but he makes it show a smiley face in its place. Anyone know how you can draw things like that on the screen? I mean, do I have to somehow get the coordinates of the text in the window and then put a smiley face on top of it? I don't get how that works.
Basically, my issue is that I can do these things with a chat box, using a wxRichTextCtrl. But, there doesn't seem to be an analogous wxRichListCtrl. So, it looks like this drawing manually is the only way. But, I don't know how it work, for instance, how to get the exact location to draw something, how it remains in place when the list changes size, screen is resized, etc.
I think the proper way to go is not looking for a rich list control, but for an owner drawn list control. It also means that you have to interpret the text yourself, and when it is a smiley figure, load it from a resource file/memory (look at portable pixmaps) and draw it on the canvas of the list control.
It is not so hard as it seems there are owner drawn examples in the wxWidgets library. It will also give you absolute freedom in what you can or cannot draw.
If you make it generic enough and use for example a semi-html syntax for your rich text listcrtrl, you could always contribute it back to wxWidgets I am sure a lot of people will appreciate that ..
With regards,
- jorgen
It is not so hard as it seems there are owner drawn examples in the wxWidgets library. It will also give you absolute freedom in what you can or cannot draw.
If you make it generic enough and use for example a semi-html syntax for your rich text listcrtrl, you could always contribute it back to wxWidgets I am sure a lot of people will appreciate that ..
With regards,
- jorgen
Forensic Software Engineer
Netherlands Forensic Insitute
http://english.forensischinstituut.nl/
-------------------------------------
Jorg's WasteBucket
http://www.xs4all.nl/~jorgb/wb
Netherlands Forensic Insitute
http://english.forensischinstituut.nl/
-------------------------------------
Jorg's WasteBucket
http://www.xs4all.nl/~jorgb/wb