Mine will always come back false if you do not have a Text object named TArchetype with dd for archetype. Then the if testing in the UIBiulder you have to populate the localtext with one of the archetypes.
But now in my yet to be released window I do
Parent.Archetype.Style='ClassStyles.' ## Parent.TArchetype.LocalText
I have that in both the OnShow and OnHoverIn because the OnShow doesn't seem to always work.
Of course this will only work in you have the following code in the root node of the window.
Code:
<Namespace Name="ClassStyles">
<ImageStyle Name="Warrior">
<ImageFrame Source="/images/widgets01.dds" SourceRect="217,4,249,34" />
</ImageStyle>
<ImageStyle Name="Mage">
<ImageFrame Source="/images/widgets01.dds" SourceRect="215,83,249,118" />
</ImageStyle>
<ImageStyle Name="Priest">
<ImageFrame Source="/images/widgets01.dds" SourceRect="217,43,249,74" />
</ImageStyle>
<ImageStyle Name="Scout">
<ImageFrame Source="/images/widgets01.dds" SourceRect="216,125,248,156" />
</ImageStyle>
</Namespace>