checkedlistbox

H

Hrvoje Voda

I can't resolve a problem how to disable changing the values of a
checkedlistbox?

I want to be able to select a text from listbox, but not be able to change
it's value.
So, if the selected item is checked it should stay checked, if not it should
stay unchecked.

Hrcko
 
J

Junnys, Caesar Group (www.caesar.nl)

Maybe this helps:
private void checkedListBox1_ItemCheck(object sender,
System.Windows.Forms.ItemCheckEventArgs e)
{
e.NewValue=e.CurrentValue;
}
 
C

Cor Ligthert [MVP]

Hrvoje,

Mostly the problems come with these kind of controls is that they start to
be recursive is you change items inside an event that handles the change of
those items.

Can that be your problem.

Cor
 
C

Chris Jobson

It works OK for me - are you sure you're not doing something else that
causes the items to be erased?
Chris Jobson
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top