Sep 24, 2009
I have a panel that is a set size and has its Autoscroll property set to True.I am parsing text files and then adding them to the panel. I'm extracting specific lines and then adding them to labels and text boxes that are in the panel.When my app runs, it can parse anywhere from 0-10 files at a time.If there are no files to parse, I don't want any controls in the panel. I'll be creating the controls based on how many text files I have. For each text file, I'll have 3 controls.
View 12 Replies
I'll count the text files before I parse them, and insert the controls into the panel.The problem is that I don't know how to place the controls based on the location of the panel/form. I know the panel will always have a permanent spot, but I won't know if the location parameters of the panel have changed because I won't know how many controls there will be before the app parses the files.
However, I will know the size of the controls that I'm inserting.So, with all of that, is there a way to insert the controls inside of the panel, and then based on that information, insert the others?