I have figured alot of widgets out but I am really struggling with the Tab Control, here is some simple code of what I am trying, although I have tried alot of things but I am either missing something fundamental or I am doing it right and its not working.
Code: Select all
tabCtrl1 = uiHelper.makeTabControl("tabCtrl1", CEGUI::UDim(0.45, 0), CEGUI::UDim(0.90, 0), CEGUI::UDim(0.025, 0), CEGUI::UDim(0.05, 0));
tabButton1 = uiHelper.makeTabButton("tabButton1");
tabButton1->setText("Model ");
tabButton2 = uiHelper.makeTabButton("tabButton2");
tabButton2->setText("Camera");
tabCtrl1->addTab(tabButton1);
tabCtrl1->addTab(tabButton2);
button1 = uiHelper.makeButton("button1", CEGUI::UDim(0.2, 0), CEGUI::UDim(0.2, 0), CEGUI::UDim(0.6, 0), CEGUI::UDim(0.2, 0));
//--HERE, How do I add buttons.sliders etc to each of my tabs?
tabButton1->addChildWindow(button1);
rootWindow->addChildWindow(tabCtrl1);
I have a helper class which is working because everything is created, I have a tab control with a couple of tabs sitting on the top, there is a large area to place my widgets but I don't know how to do it.
I can add the button to the root window and that works, so my button code is fine also. I have searched for an example but cant find one.
Thanks for any help,
Matty