Theme changing not applying in side tabs

  1. #1

    Theme changing not applying in side tabs

    i'm using
    this.re1.Theme =(Theme)Enum.Parse(typeof(Theme), StyleSwitcher.SelectedItem.Text);
    for changing theme but its not working.

    but it works with

     <Listeners>
              <Select Handler="Ext.net.ResourceMgr.setTheme('/extjs/resources/css/xtheme-' + el.getValue() + '-embedded-css/ext.axd');" />
     </Listeners>
    but it applies only to the tab parent form.

    i want a solution like in examples.ext.net
  2. #2
    In the Examples Explorer, when the Theme is changed, it is changed on the main Viewport and then loop through all the Tabs and setTheme is called on each of those as well.

    You can view the source of the Examples Explorer to see this code.

    Hope this helps.
    Geoffrey McGill
    Founder
  3. #3
    Here's the JavaScript code which loops through all the Tabs and sets the Theme.

    Example

    <script type="text/javascript">
        Ext.net.ResourceMgr.setTheme(result);
        
        ExampleTabs.items.each(function (el) {
            if (!Ext.isEmpty(el.iframe)) {
                if (el.getBody().Ext) {
                    el.getBody().Ext.net.ResourceMgr.setTheme(result);
                }
            }
        });
    </script>
    Hope this helps.
    Geoffrey McGill
    Founder
  4. #4

    Can you provide the complete example explorer

    Hi,

    I have tried the code you have provided. but still its not working,
    Can you provide the complete example explorer source , like we have in Coolite.Net

Similar Threads

  1. [CLOSED] Container creating box when changing theme.
    By webppl in forum 1.x Legacy Premium Help
    Replies: 7
    Last Post: Jun 23, 2011, 9:30 AM
  2. [CLOSED] Strange SpinnerField appearance after changing theme
    By voipswitch in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: May 13, 2011, 2:56 PM
  3. Replies: 14
    Last Post: Feb 16, 2011, 1:38 PM
  4. Applying Custom Theme
    By fabiomarcos in forum 1.x Help
    Replies: 10
    Last Post: Oct 09, 2009, 4:20 AM
  5. [CLOSED] Problem in applying theme to web page in Tab Panel
    By Etisbew in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Sep 03, 2009, 11:59 PM

Posting Permissions