Click here to Skip to main content
15,913,685 members
Home / Discussions / C#
   

C#

 
GeneralRe: class object properties Pin
Wendelius12-Aug-08 10:08
mentorWendelius12-Aug-08 10:08 
GeneralRe: class object properties Pin
netJP12L12-Aug-08 12:03
netJP12L12-Aug-08 12:03 
GeneralRe: class object properties Pin
Wendelius12-Aug-08 12:13
mentorWendelius12-Aug-08 12:13 
AnswerRe: class object properties [modified] Pin
visualhint13-Aug-08 5:06
visualhint13-Aug-08 5:06 
QuestionIsolated Storaged: How to Access Isolated Storage of a Different Assembly? Pin
stilz12-Aug-08 8:33
stilz12-Aug-08 8:33 
QuestionDisable A Listbox Item Pin
Kevin Marois12-Aug-08 8:24
professionalKevin Marois12-Aug-08 8:24 
AnswerRe: Disable A Listbox Item Pin
Mark Salsbery12-Aug-08 8:52
Mark Salsbery12-Aug-08 8:52 
AnswerRe: Disable A Listbox Item Pin
Wendelius12-Aug-08 8:58
mentorWendelius12-Aug-08 8:58 
Hi,

Since listbox items are objects they don't expose any special UI functionality. However the effect can be done by code by wiring SelectedIndexChanged-event and if the selected index should be handled as disabled, remove the selection.

However this isn't visual to the user since every item looks the same. There's no way of telling which is disabled and which isn't. Of course you can use owner drawn technique to make a different visualization, but that's not the only option.

What I would suggest is that you actually use ListView control instead. Since ListView contains ListViewItems, which are UI elements it's easier to control visual appearance by simply controlling Font and ForeColor. In ListView you also have to remove the selection when user clicks on an item. To do this, wire ItemActivate event and remove the selection if needed.

Hope this helps,

Mika
QuestionCollectionEditor Pin
gborges12-Aug-08 7:35
gborges12-Aug-08 7:35 
AnswerRe: CollectionEditor Pin
Wendelius12-Aug-08 8:02
mentorWendelius12-Aug-08 8:02 
QuestionQuestion about proper seperation of domain and DAL layers Pin
Togakangaroo12-Aug-08 6:28
Togakangaroo12-Aug-08 6:28 
QuestionSummer Code Compettion Entry Information Pin
sayantan samanta12-Aug-08 6:18
sayantan samanta12-Aug-08 6:18 
AnswerRe: Summer Code Compettion Entry Information Pin
Manas Bhardwaj12-Aug-08 7:09
professionalManas Bhardwaj12-Aug-08 7:09 
AnswerRe: Summer Code Compettion Entry Information Pin
Dan Neely12-Aug-08 7:59
Dan Neely12-Aug-08 7:59 
AnswerRe: Summer Code Compettion Entry Information Pin
Pete O'Hanlon12-Aug-08 9:18
mvePete O'Hanlon12-Aug-08 9:18 
AnswerRe: Summer Code Compettion Entry Information Pin
Thomas Stockwell14-Aug-08 2:09
professionalThomas Stockwell14-Aug-08 2:09 
QuestionEvent handling in C# Pin
TheComputerMan12-Aug-08 5:38
TheComputerMan12-Aug-08 5:38 
AnswerRe: Event handling in C# Pin
J4amieC12-Aug-08 5:59
J4amieC12-Aug-08 5:59 
GeneralRe: Event handling in C# Pin
TheComputerMan12-Aug-08 6:11
TheComputerMan12-Aug-08 6:11 
QuestionBest DJ software to control? Pin
BobbyWhiskey12-Aug-08 5:28
BobbyWhiskey12-Aug-08 5:28 
QuestionWebbrowser and dialog boxes Pin
Dewald12-Aug-08 5:27
Dewald12-Aug-08 5:27 
QuestionProblem with Invalid Date Pin
Reality Strikes12-Aug-08 5:23
Reality Strikes12-Aug-08 5:23 
AnswerRe: Problem with Invalid Date Pin
J4amieC12-Aug-08 5:28
J4amieC12-Aug-08 5:28 
GeneralRe: Problem with Invalid Date Pin
Reality Strikes12-Aug-08 8:01
Reality Strikes12-Aug-08 8:01 
GeneralRe: Problem with Invalid Date Pin
Alan N12-Aug-08 8:52
Alan N12-Aug-08 8:52 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.