PDA

View Full Version : [CLOSED] TabPanel layout fails when updating ResourceManager's theme



RCN
Nov 07, 2012, 12:39 PM
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
5040

Access Theme - ERROR
5041

Access Theme - EXPECTED BEHAVIOUR
5042

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:
5043

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>

Daniil
Nov 07, 2012, 1:43 PM
Hi Raphael,

Please follow:
http://forums.ext.net/showthread.php?21976&p=94945&viewfull=1#post94945

RCN
Nov 09, 2012, 6:53 PM
Daniil, please mark it as closed.

Note: For more information about the closure of this thread, please see the following thread: http://forums.ext.net/showthread.php?21976-Grid-layout-fails-when-updating-ResourceManager-s-theme

Daniil
Nov 12, 2012, 10:35 AM
Thank you for the update, Raphael!