PDA

View Full Version : How to add components in a smart way?



mars0122
15 Jun 2011, 9:28 PM
When I switch cards in a TabPanel, I want to add some specified components into the current actived sub-panel, it blurned out that the second component can mask the first one. I tried insert adn add method but with the same problem.So, my dear friends,how to add components in a dynamic way without a specified layout? Thank you!:)

skirtle
17 Jun 2011, 6:22 AM
Using add() and insert() should work, though you might need to call doLayout().


So, my dear friends,how to add components in a dynamic way without a specified layout?

You must specify a suitable layout for all containers, you can't expect it to layout your components correctly if you don't specify what 'correct' is.