Results 1 to 9 of 9

Thread: [CLOSED]panel.setTitle("hi"); not working

    Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Sencha User
    Join Date
    Jan 2011
    Posts
    46
    Vote Rating
    0
      0  

    Default [CLOSED]panel.setTitle("hi"); not working

    using:
    panel.setTitle("hi");

    not working when panel is inside a TabPanel

  2. #2
    Sencha Premium Member steffenk's Avatar
    Join Date
    Jul 2007
    Location
    Haan, Germany
    Posts
    2,676
    Vote Rating
    9
      0  

    Default

    If you look to the docs, tabpanels are different to Ext3.
    For example, go to
    http://dev.sencha.com/deploy/ext-4.0...ow/layout.html

    Open the window and then eg execute this in console:

    Code:
    Ext.getCmp("tabpanel-1018").getActiveTab().tab.setText('hi')
    Indeed result looks strange as the tab is shortened, and creating the tabpanel use title for tab text.
    Let's see what the team suggest here.
    vg Steffen
    --------------------------------------
    Release Manager of TYPO3 4.5

  3. #3
    Sencha User
    Join Date
    Jan 2011
    Posts
    46
    Vote Rating
    0
      0  

    Default

    I'm creating a Ext.panel.Panel an adds it to a TabPanel.
    Later i want to change the tab text of this panel.
    Im also curios if i can do this using the reference i have to my Ext.panel.Panel, or if i have to find a new reference to it via the TabPanel.get or something like that..

  4. #4
    Sencha User
    Join Date
    Jan 2011
    Posts
    46
    Vote Rating
    0
      0  

    Default

    I'm still wondering if anybodey out there might know how i can set a new title of a tab when i only have the reference of the panel witch is inside a TabPanel. It is not nesseserry the active tab so the above wont help me. Still think it makes more sense if panel.setTitle is an alias for setting the tab title, so I hope this issue will be adressed.

  5. #5
    Sencha Premium User evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    19,211
    Vote Rating
    1005
      0  

    Default

    Not a bug:

    Code:
    Ext.require('*');
    Ext.onReady(function(){
        var tabs = new Ext.tab.TabPanel({
            renderTo: document.body,
            width: 200,
            height: 200,
            items: {
                title: 'Foo',
                html: 'a'
            }
        });
        
        setTimeout(function(){
            tabs.items.first().tab.setText('Bar');
        }, 1000);
    });
    Twitter - @evantrimboli
    Former Sencha framework engineer, available for consulting.
    As of 2017-09-22 I am not employed by Sencha, all subsequent posts are my own and do not represent Sencha in any way.

  6. #6
    Sencha User
    Join Date
    Jan 2011
    Posts
    46
    Vote Rating
    0
      0  

    Default

    Ok, let me clerify once more.

    Is there a way to get ther reference to the tab when i only have a reference to the panel witch i have added to my TabPanel.

    panel.tab is undifined even after i have added it to a TabPanel.

    You suggest going through TabPanel.first().tab, but I dont know the position of my panel in the TabPanel. so i cant use first.

    Is there a way of getting the regerence to the tab when you have a reference to the component added to TabPanel?

    In ExtJs 3 these were the same objecet so that was no stress, but in extjs 4 i cant find any bining between tab and component.

  7. #7
    Sencha User
    Join Date
    Jan 2011
    Posts
    46
    Vote Rating
    0
      0  

    Default

    Never mind..

    I figured out I just forgot to use setText insted of setTitle.
    hehe

    Tanks allot! now it works

  8. #8
    Sencha Premium Member steffenk's Avatar
    Join Date
    Jul 2007
    Location
    Haan, Germany
    Posts
    2,676
    Vote Rating
    9
      0  

    Default

    @Evan, did you checked what happens what i do in #2? Text si replaced, but tabs are not redrawn!
    vg Steffen
    --------------------------------------
    Release Manager of TYPO3 4.5

  9. #9
    Sencha User Animal's Avatar
    Join Date
    Mar 2007
    Location
    Bédoin/Nottingham
    Posts
    30,891
    Vote Rating
    89
      0  

    Default

    Quote Originally Posted by oe.elvik View Post
    Ok, let me clerify once more.

    Is there a way to get ther reference to the tab when i only have a reference to the panel witch i have added to my TabPanel.
    Code:
    Ext.getCmp("panel-1022").tab.el.dom

Similar Threads

  1. Panel.setTitle after construct but before render
    By inf3rno in forum Ext 3.x: Help & Discussion
    Replies: 2
    Last Post: 3 Jan 2011, 3:59 PM
  2. Replies: 34
    Last Post: 29 Dec 2009, 9:10 AM
  3. [2.0.1][CLOSED] panel splits not working under IE 6
    By codeslice in forum Ext 2.x: Bugs
    Replies: 2
    Last Post: 18 Feb 2008, 12:30 AM
  4. [2.0rc1][CLOSED] panel setTitle bug
    By slobo in forum Ext 2.x: Bugs
    Replies: 3
    Last Post: 10 Nov 2007, 3:13 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •