souvarine
27-09-2009 13:36:06
Hello.
I've made some tabs with widgets on them. I've disabled some of these widgets with setEnabled(false) but when I switch from one tab to another the disabled widgets are magically enabled. Does anybody had this problem already ?
telchar
05-10-2009 00:17:29
I have created a Tab widget with severals TabItem in it. On each TabItem i have some button/text/etc.
It can be resumed like this
- Tab
- TabItem1
- childs1[/*:m][/list:u][/*:m]
- TabItem2
- childs2[/*:m][/list:u][/*:m][/list:u][/*:m][/list:u]
When I launch my application, i can access to "childs1"
If i click on "TabItem2" then i can still see "childs1" (they seems disabled though -- i cannot edit text for example) but not "childs2".
Is this the same problem ?
Edit: I use MyGUI2.2.2
Altren
05-10-2009 00:25:09
Update to MyGUI 2.2.3 - it was fixed.
telchar
05-10-2009 00:55:20
thanks, I tried .. and it doesn't seem to change anything. Is there something special to add in the code of my app ?
Altren
05-10-2009 01:15:55
Show me your code that creates widgets on tab. (or layout if they loaded from it)
telchar
05-10-2009 13:55:20
the .layout
<Widget type="Window" skin="WindowCS" position="504 248 440 416" layer="Back" name="CreateCharacterWindow">
<Property key="Widget_Caption" value="Nouveau Personnage"/>
<Widget type="Tab" skin="Tab" position="4 9 420 327" layer="Back" name="ccwTabs">
<Widget type="TabItem" skin="Default" position="4 26 411 295" layer="Back" name="ccwTabGeneral">
<Property key="Widget_Caption" value="General"/>
<Widget type="StaticText" skin="StaticText" position="13 18 144 20">
<Property key="Widget_Caption" value="Nom du personnage"/>
</Widget>
<Widget type="Edit" skin="Edit" position="173 14 235 24" name="newName"/>
<Widget type="StaticText" skin="StaticText" position="13 58 352 20">
<Property key="Widget_Caption" value="Description (Apparence physique) du personnage"/>
</Widget>
<Widget type="Edit" skin="EditStretch" position="13 82 395 184" name="newDescription">
<Property key="Edit_MultiLine" value="true"/>
<Property key="Edit_ReadOnly" value="false"/>
<Property key="Edit_MaxTextLength" value="512"/>
</Widget>
<Widget type="Button" skin="RadioBox" position="12 270 104 16" layer="Back" name="sexeHomme">
<Property key="Widget_Caption" value="Homme"/>
</Widget>
<Widget type="Button" skin="RadioBox" position="124 270 96 16" layer="Back" name="sexeFemme">
<Property key="Widget_Caption" value="Femme"/>
</Widget>
</Widget>
<Widget type="TabItem" skin="Default" position="4 26 411 295" layer="Back" name="ccwTabApparence">
<Property key="Widget_Caption" value="Apparence"/>
<Widget type="StaticText" skin="StaticText" position="108 94 188 40" layer="Back">
<Property key="Text_FontHeight" value="30"/>
<Property key="Widget_Caption" value="NOT AVAILABLE"/>
</Widget>
</Widget>
</Widget>
<Widget type="Button" skin="Button" position="224 345 196 24" layer="Back" name="newCreate">
<Property key="Widget_Caption" value="Creer ce personnage"/>
</Widget>
<Widget type="Button" skin="Button" position="12 345 196 24" layer="Back" name="newCancel">
<Property key="Widget_Caption" value="Annuler"/>
</Widget>
</Widget>
and my code
mWindow = gui->findWidget<MyGUI::Window>("CreateCharacterWindow");
mTabs = gui->findWidget<MyGUI::Tab>("ccwTabs");
mTabGeneral = gui->findWidget<MyGUI::TabItem>("ccwTabGeneral");
mCharacterName = gui->findWidget<MyGUI::Edit>("newName");
mCharacterDescription = gui->findWidget<MyGUI::Edit>("newDescription");
mBtnCancel = gui->findWidget<MyGUI::Button>("newCancel");
mBtnCreate = gui->findWidget<MyGUI::Button>("newCreate");
mSexeFemme = gui->findWidget<MyGUI::Button>("sexeFemme");
mSexeHomme = gui->findWidget<MyGUI::Button>("sexeHomme");
mTabApparence = gui->findWidget<MyGUI::TabItem>("ccwTabApparence");
telchar
08-10-2009 02:28:35
little up here, any leads ?
my.name
09-10-2009 07:32:06
updare from svn - version 2.2.3
example
change
<Widget type="Edit" skin="EditStretch" position="13 82 395 184" name="newDescription">
<Property key="Edit_MultiLine" value="true"/>
<Property key="Edit_ReadOnly" value="false"/>
<Property key="Edit_MaxTextLength" value="512"/>
</Widget>
to
<Widget type="Edit" skin="EditStretch" position="13 82 395 184" name="newDescription">
<Property key="Edit_MultiLine" value="true"/>
<Property key="Edit_ReadOnly" value="false"/>
<Property key="Edit_MaxTextLength" value="512"/>
<Property key="Widget_Enabled" value="false"/>
</Widget>
and switch sheets
telchar
09-10-2009 16:37:32
i just updated to MyGUI2.2 from svn (tags/MyGUI2.2), and it doesn't change anything :s