Deshabilitar elementos de ListBox

As far as I know, there is no way to grey out/disable specific items in the ListBox control?

I want to make a list of surveys that need to be answered, but grey out/disable those that the user has already answered.

Anyone got some advices how I should do this? Or is there some way to do it with ListBox?

preguntado el 03 de mayo de 12 a las 17:05

1 Respuestas

You will need to do custom drawing to handle this. Look up OwnerDraw

The typical (and simpler) pattern is just to not include those items in the ListBox.

Una alternativa sería utilizar ListView in Details view mode. Then you can modify each item's fore/back colors, font, and more.

contestado el 03 de mayo de 12 a las 17:05

Well, I wanted to make a function for "Show all" and "Show unanswered", but I guess I'll just leave the answered ones out. Anyway, thanks for your answer! - janlindso

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.