I am creating a WinForm application that basically generates Math worksheets. I know there are few of them out there already but most are paid and the free ones do not have the options I want.
Anyway, the point of the app is to create a “page” in a 4 x 10 grid (this can be changed to 5×8, 2×20, etc.) where each cell would contain a Math problem. Think of an address label sheet.
My questions:
-
Do I create a form exactly the way I want it and then print out the form? If so, that would be 5 labels per question or 200 labels per sheet. Kind of cumbersome, IMO.
-
Is there a way to create a one template with 5 labels, populate the text property of the 5 labels and then “rubberstamp” the template 40 times per page in a 4×10 for example? This method would be preferable since then I don’t have to generate the math problems and keep track of what numbers will go to what label.
I apologize if the title is little confusing but I could not think of a better one.
Thanks
It sounds like you’re looking for user controls. Create a user control that represents one problem, with all of the labels/formatting/whatever for that one question. Your worksheet can then add a number of those user controls to the form. (I’d do this dynamically using for loops rather than dragging 40 of them onto a form, especially if the number isn’t static.)