First I should say I'm doing this in a Windows Form.
I would prefer a listbox but I don't care if it's a listview in detailview
or not.
I basically want something like a listbox that has a list containing a
checkbox and a textbox that scrolls.
So the list would look like this:
checkbox textbox
checkbox textbox
checkbox textbox
I tried creating a user control that has a checkbox and textbox and putting
that onto a listbox but I wasn't able to get that to work.
The closest I've come is using a ListView. Except the problem is that the
controls don't scroll. If I could get the scrolling to work then I'd have it.
Here's what I've got so far:
foreach (Column column in columns)
{
ListViewItem item = new ListViewItem();
item.Text = column.Name;
listView1.Items .Add(item);
ColumnListContr ol control = new ColumnListContr ol(true, column.Name,
column.Name);
control.Height = item.Bounds.Hei ght;
control.Locatio n = new Point(0, item.Bounds.Y);
listView1.Contr ols.Add(control );
}
-------------------------
"Cor Ligthert" wrote:
John,
Do you mean something as a listview in detailview?
Cor
"John R." <jo*******@news groups.nospam>
I want to have a listbox that shows a checkbox and a textbox.
I created a user control that has a checkbox and a textbox in it and have
been trying to add it to a listbox but I can't get it to show up for each
item I add to the listbox.
foreach (Column column in columns)
{
ColumnsListBox. Items.Add(colum n.Name);
ColumnsListBox. Controls.Add(ne w ColumnListContr ol(true,
column.Name,
column.Name));
}
I've also looked at using an Owner Draw listbox but can't figure that out
either.
I basically need something that looks like a listbox with 2 columns in
it --
a checkbox and a textbox.
How can I get that to work so I can add items to the object and set the
subitem values?
Thanks in advance.