Deshabilitar elementos de ListBox
Frecuentes
Visto 2,202 veces
0
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?
1 Respuestas
2
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
No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas vb.net winforms listbox or haz tu propia pregunta.
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