Hi,
I would like to add a checkbox control to a listbox control.
The listbox has to contain A couple of tasks, and I have to check if a tasks has been opened before.
I have a code sample, but it adds the checkbox as an object, not as a control
while (reader.Read())
{
CheckBox c = new CheckBox().Enabled = false;
c.Text = reader.GetString(0) + ". " + reader.GetString(1);
try
{
if (int.Parse(reader.GetString(2)) > 1) c.Checked = true;
}
catch(Exception ex)
{
MessageBox.Show(ex.Message);
}
listTasks.Items.Add(c);
}
Can someone help me out
Thnx, Ruben