CheckedListBox question
it's blue by default....
it's blue by default....
I would like to completely turn off this highlight. Is there a way to do this? I just want the checkboxes to be checked/unchecked. There is no need for the entire item to be selected when checking/unchecking.
I also tried using checkboxes inside of a groupbox and accessing them with foreach (CheckBox checkbox in groupBox1.Controls), but the values are returned in "bottom to top" order.
ok this is what I did.....
privatevoid button3_Click(object sender, EventArgs e){
for (int i = groupBox1.Controls.Count-1; i >= 0; i--){
CheckBox chx = (CheckBox)groupBox1.Controls
;
if (chx.Checked)
{
MessageBox.Show(chx.Name);
}
}
}
private void myCheckedListBox1_MouseDown(object sender, MouseEventArgs e) {
int ix = CheckedListBox1.IndexFromPoint(e.Location);
if (ix >= 0) CheckedListBox1.SetItemChecked(ix, !CheckedListBox1.GetItemChecked(ix));
}