checkedlistbox

  • Thread starter Thread starter Hrvoje Voda
  • Start date Start date
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
 
Maybe this helps:
private void checkedListBox1_ItemCheck(object sender,
System.Windows.Forms.ItemCheckEventArgs e)
{
e.NewValue=e.CurrentValue;
}
 
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
 
It works OK for me - are you sure you're not doing something else that
causes the items to be erased?
Chris Jobson
 
Back
Top