-
Dynamicly adding tabs
I have a tab control on my form, I am also making a DLL in which I want to keep pretty much all data that will be used on the tabs within it (so I can update it alter when the program is completed without updating the program)
However, I am having problems.
When my form loads, I had it set to add some tabpages by range which requires an array of system.windows.forms.tabpage. I made a function within the DLL which would return the array of tabpage and I put that within the TabControl.TabPages.AddRange function.
I got no errors and when I compiled it looked fine, the tab is on the child window, I clicked a button to create the child window and I get a System.OutOfMemory excemption.
Why doesn't this work?
-
Post code and maybe we can help. Sounds like a problem in a loop or something.