getting a child
Posted: Tue Nov 20, 2007 17:46
I have the following layout:
I need to get the static text named Strength, but I cant find a wa to do it. I have tried several variations of this:
but always got an exception saying that cant find it.
Code: Select all
Window Type="TaharezLook/FrameWindow" Name="charWindow">
<Property Name="UnifiedPosition" Value="{{0.3,0},{0.2,0}}" />
<Property Name="UnifiedSize" Value="{{0.45,0},{0.5,0}}" />
<Property Name="Visible" Value="false" />
<Window Type="TaharezLook/TabControl" Name="charInfo">
<Property Name="UnifiedPosition" Value="{{0.0,0},{0.01,0}}" />
<Property Name="UnifiedSize" Value="{{1.0,0},{0.8,0}}" />
<Window Type="TaharezLook/TabContentPane" Name="charAttr">
<Property Name="UnifiedPosition" Value="{{0.0,0},{0.01,0}}" />
<Property Name="UnifiedSize" Value="{{1.0,0},{0.98,0}}" />
<Property Name="Text" Value="Attributes" />
<Window Type="TaharezLook/StaticText" Name="Strength">
<Property Name="UnifiedPosition" Value="{{0.03,0},{0.1,0}}" />
<Property Name="UnifiedSize" Value="{{0.2,0},{0.17,0}}" />
<Property Name="Text" Value="Strength" />
<Property Name="FrameEnabled" Value="false" />
</Window>
I need to get the static text named Strength, but I cant find a wa to do it. I have tried several variations of this:
Code: Select all
test = (CEGUI::FrameWindow*)charWin->getChild("charInfo")->getChild("charAttr")->getChild("Rmagic");
but always got an exception saying that cant find it.