for(r = row.GetNextRow(); r; r = r.GetNextRow())
{
Button checkBox = listBox.buttonMaps[(int)r];
- checkBox.position.y = 1 + (r.index + listBox.hasHeader) * listBox.rowHeight;
+ if(checkBox)
+ checkBox.position.y = 1 + (r.index + listBox.hasHeader) * listBox.rowHeight;
}
return true;
}
for(r = row.firstRow; r; r = r.next)
{
Iterator<DataRow> it { rowChecks };
+
if(it.Find(r))
it.Remove();
UnsetChildren(r);
+ NotifyChanged(master, this, r);
}
- NotifyChanged(master, this, row);
}
void SetCheck(DataRow row, bool checked)
for(parent = row.parent; parent; parent = parent.parent)
{
- DataRow r;
CheckListBoxButton button = buttonMaps[(int)parent];
if(button)
{
+ // Partial Check
button.checked = true;
button.buttonState = down;
+
+ NotifyChanged(master, this, parent);
}
}
}
button.checked = false;
button.buttonState = up;
}
+
+ NotifyChanged(master, this, parent);
}
}
}
public:
bool IsChecked(DataRow row)
{
+ CheckListBoxButton button = buttonMaps[(int)row];
DataRow parent;
for(parent = row; parent; parent = parent.parent) if(rowChecks.Find(parent)) return true;
+ // For partially checked because of children:
+ if(button && button.checked)
+ return true;
return false;
}