find widgets

itsalamanca

29-10-2008 08:11:59

hi ,

i have a problem with a file.layout

<?xml version="1.0" encoding="UTF-8"?>
<MyGUI type="Layout">
<Widget type="Window" skin="WindowCS" position="333 152 243 288" layer="Back">
<Widget type="Button" skin="ButtonSmall" position="64 80 100 100"/>
</Widget>
</MyGUI>



I have access to the window widget, but when i tried to use the button, i have an execution mistake.

I load it that way:


MyGUI::LayoutManager::getInstance().load("ventanaconboton.layout");
MyGUI::WindowPtr ventana= mGUI->findWidget<MyGUI::Window>("WindowCS", "Overlapped");
MyGUI::ButtonPtr boton2=mGUI->findWidget<MyGUI::Button>("ButtonSmall");


Do you have any ideas????

my.name

29-10-2008 10:42:58

<?xml version="1.0" encoding="UTF-8"?>
<MyGUI type="Layout">
<Widget type="Window" skin="WindowCS" position="333 152 243 288" layer="Back">
<Widget type="Button" skin="ButtonSmall" position="64 80 100 100" name="MyButton"/>
</Widget>
</MyGUI>


MyGUI::LayoutManager::getInstance().load("ventanaconboton.layout");
MyGUI::ButtonPtr boton2=mGUI->findWidget<MyGUI::Button>("MyButton");

itsalamanca

29-10-2008 10:54:28

thanks a lot.