haibo19981984
19-05-2010 08:34:18
Today I update the myGUI from svn.
When I test the demo Demo_Themes.exe,I find the CheckBox and RadioBox have not the states "checked".
But I find the describing of CheckBox has 8 states in the corn_skin.xml
It seems the demo only have 4 states that all have not "checked".
I want to know that whether is this a bug or not.
haibo19981984
19-05-2010 14:37:36
If it is not a bug,how can I come true CheckBox that has 8 states.
my code as follows:
core_skin.xml
<Resource type="ResourceSkin" name = "CheckBox" size = "100 21" texture = "#{MyGUI_Theme_Texture}">
<Property key="FontName" value = "Default" />
<Property key="TextAlign" value = "Left VCenter" />
<Property key="TextColour" value = "#{MyGUI_Theme_Button_ColourNormal}"/>
<BasisSkin type="SubSkin" offset = "0 0 21 21" align = "Left VCenter">
<State name="disabled" offset = "2 2 21 21"/>
<State name="normal" offset = "2 24 21 21"/>
<State name="highlighted" offset = "2 46 21 21"/>
<State name="pushed" offset = "2 68 21 21"/>
<State name="disabled_checked" offset = "2 90 21 21"/>
<State name="normal_checked" offset = "2 112 21 21"/>
<State name="highlighted_checked" offset = "2 134 21 21"/>
<State name="pushed_checked" offset = "2 156 21 21"/>
</BasisSkin>
<BasisSkin type="SimpleText" offset = "24 0 76 21" align = "Stretch">
</BasisSkin>
</Resource>
test.layout
<Widget type="Button" skin="CheckBox" position="176 48 72 16" layer="Back"/>
Whether should I add some code in test.layout for "checked".
Or I must add some code in my app.
Altren
19-05-2010 15:14:24
ChackBox is actually skin for Button, so by default it have button behaviour. Check
FAQ(question about CheckBox) to see how make it stay checked after click.
haibo19981984
19-05-2010 16:16:25
Thank you.I solve the problem.