Help for WinForms app in visual studio
I am creating something for my school project so im fairly new to c# and coding as a whole but basically i have a main form with loads of topic buttons and depending on which button is selected it will open up a new form which is instantiated so I can change the title depending on which button is clicked. On this page i want various picture boxes with different background images i know how i would change the images. However, each topic has a different amount of picture boxes required and im not sure how to only get the correct number when pressing the button. My only idea is to put in the maximum I need which is 8 and make the extra unused ones the same colour as the background of the form so they appear empty which is extremely clunky and doesn't work well. Any ideas, any help would be greatly appreciated?
5 Replies
In any other framework you would have some sort of a multi-item control, like a
ListBox
or a GridView
or something, that can contain 0 to n
items
I'd assume Winforms also has something similar, to which you can bind a collection of images
And whether there's just one, eight, or 79, it will display them alllike a container sort of thing?
ye
cheer thank you much appreciated