Yup, it solves it. I have just now made a nice tab pane with two different tabs attached. Very cool, thanks again to you and Sinbad for this.
There may be a little bug remaining with the tab selection though, I think.
On app initialisation, the tab control looks fine; both tab buttons are there and so is the correct content in the content pane.
If I click on the second tab, it switches the content pane as expected. But click on the first again MORE THAN ONCE, and the second tab button disappears. Clicking back on the space where the second tab button was, it reappears. Clicking on each button on and off makes the second tab button come and go, sometimes it doesnt display again.
Heres a pic of what Im talking about:
Heres the code:
Code: Select all
StaticText* TabTestPanel1 = (StaticText*)WindowManager::getSingleton().createWindow((utf8*)"Taharez StaticText", (utf8*)"Tab Test Panel 1");
TabTestPanel1->setPosition(Point(0.01f, 0.1f));
TabTestPanel1->setSize(Size(0.96f, 0.82f));
TabTestPanel1->setFrameEnabled(false);
TabTestPanel1->setBackgroundEnabled(false);
TabTestPanel1->setText( (utf8*) "BOB");
StaticText* TabTestPanel2 = (StaticText*)WindowManager::getSingleton().createWindow((utf8*)"Taharez StaticText", (utf8*)"Tab Test Panel 2");
TabTestPanel2->setPosition(Point(0.01f, 0.1f));
TabTestPanel2->setSize(Size(0.96f, 0.82f));
TabTestPanel2->setFrameEnabled(false);
TabTestPanel2->setBackgroundEnabled(false);
TabTestPanel2->setText( (utf8*) "BOBs brother");
TabControl* testTab = (TabControl*)winMgr.createWindow((utf8*)"Taharez Tab Control", (utf8*)"test tab control");
testTab->setPosition(Point(0.1f, 0.5f));
testTab->setSize(Size(0.4f, 0.4f));
testTab->addTab(TabTestPanel1);
testTab->addTab(TabTestPanel2);
testTab->setSelectedTab( (utf8*) "Tab Test Panel 1");
testTab->setTabHeight(0.2f);