I really have not tried something like this, but what I
think of, is a
ControlCollection that every ContainerControl (such as Form)
contains.
Because of the fact that ControlCollection implements the
ICollection
interface, you can use it's Add() method to add to it as
much new items
as you wish.
So, basically, what you need to do is to implement new
"custom"
control, consisting of the textbox and the checkbox, and
then, having
it, to add dynamically to the chosen form's
ControlCollection.
After that, call the Refresh() (or Update(), I am not
sure)method of
the ContainerControl to repaint it's surface.
Once again, I've not tried something like this, but
basically it is the
direction. For additional reference see the
System.Windows.Forms
namespace documentation.
Regards
Mick
|