I've googled a bit and managed to find a few articles on how to add controls from within a running application, but neither seem to explain it in a way that suits my needs. I wonder if anybody can help me understand how I can go about this, or direct me to a resource that will do the same.

I'm writing a recipe book application, and as part of the process of adding/editing a recipe, I want to be able to let the user add or remove ingredients from a list. Obviously, there's no way to know how many ingredients will be in any given recipe, so I cannot add that many textboxes beforehand.

I want to have a textbox with a +/- button to the right of it like you see on many websites, so that when the user clicks the +, it will make a new control below it, and if they click the -, then it will delete that control. Also, while it may be a slightly different topic, I'd also like to know how I can let the user re-arrange the textboxes so they display accordingly on a printout.

I've decided that I'm going to use the datagridview control, as it seems to best suit my needs.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.20 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.