x = CREATEOBJECT('form')
x.Show
x.AddObject('MyContainer','container')
x.MyContainer.visible = .t.
This creates a form and adds a container. In your specific instance - you need to replace 'container' with the name of the container you wish to add from your classlib, and adjust its positioning, etc.
and you can add another with the above code suggested.
HOwever, you can also think of putting all the containers in the form and making their VISIBLE = .f. by default. Then based on whatever user choice, make the relevant containers visible = .t.
I once wrote an application that displayed questions on a form. The questions were table driven and could be different types. (combo box, option groups, check box, text, etc.)
Obviously, this could get out of control after answer just a few questions. Therefore, I saved the name of the control(s) into an array property on the form. Before building the next question, I had to destroy the prior question (object) using ramani's suggestion, but tweaked to include the value in the array.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.