Nov 07, 2012, 12:39 PM
[CLOSED] TabPanel layout fails when updating ResourceManager's theme
When the INITIAL ResourceManager's theme is set to Gray or Default (View - line 1) and then, the theme is updated to Access (using the existing SelectBox), the background color of all tabs fail, as shown bellow:
Gray theme
Access Theme - ERROR
Access Theme - EXPECTED BEHAVIOUR
Note: The problem does not occur if the INITIAL ResourceManager's theme is set to Access, then the theme is set to Default or Gray and then, set to Access again.
Going Furter, after changing the theme, it's necessary to update the layout of TabPanel (JavaScript - line 4), otherwise, the title of all tabs break, as shown bellow:
Thanks in advance
1 - View
Gray theme
Access Theme - ERROR
Access Theme - EXPECTED BEHAVIOUR
Note: The problem does not occur if the INITIAL ResourceManager's theme is set to Access, then the theme is set to Default or Gray and then, set to Access again.
Going Furter, after changing the theme, it's necessary to update the layout of TabPanel (JavaScript - line 4), otherwise, the title of all tabs break, as shown bellow:
Thanks in advance
1 - View
<ext:ResourceManager ID="ResourceManager1" runat="server" Theme="Gray" />
<ext:Panel ID="Panel1" Margin="10" Header="false" runat="server">
<Items>
<ext:SelectBox ID="SelectBox1" FieldLabel="Change the Theme" LabelAlign="Top" runat="server">
<Items>
<ext:ListItem Text="Gray" />
<ext:ListItem Text="Access" />
</Items>
<Listeners>
<Change Handler="setTheme(item.value)" />
</Listeners>
</ext:SelectBox>
<ext:TabPanel ID="TabPanel1" runat="server" ActiveTabIndex="0" Width="600" Height="250"
Plain="true">
<Items>
<ext:Panel runat="server" Title="Tab 1" Html="Tab 1"
BodyPadding="6" AutoScroll="true" />
<ext:Panel runat="server" Title="Tab 2" Html="Tab 2"
BodyPadding="6" AutoScroll="true" />
</Items>
</ext:TabPanel>
</Items>
</ext:Panel>
2 - Javascript<script type="text/javascript">
var setTheme = function (theme) {
Ext.net.ResourceMgr.setTheme(theme);
App.TabPanel1.doLayout();
}
</script>
Last edited by Daniil; Nov 09, 2012 at 3:23 PM.
Reason: [CLOSED]