Problems with changing tab text in client mode

pinTab

Problems with changing tab text in client mode


fora 04-15-2006, 12:52
I add tabs by code inside all tabs:
parent.parent.dodajTabulator();
the dodajTabulator is defined in main page (index.aspx) where i have pinTab control.
            function dodajTabulator()
            {
                var item = __objpinTab1.createItem();
                item.url ='../prva.aspx';
                item.title = 'Prva stran';
                item.text = 'Prva stran';
                __objpinTab1.addDyn(item);
                __objpinTab1.getTabItemByIndex(__objpinTab1.getItems().length - 1);
              }
The first problems appears at the last item. The active tab hasn't change to the new tab just added.
On every page i have the next line of code:
  <body>
        <script language="javascript">
            parent.parent.setTabulatorTitle('<%# getTabTitle() %>');
        </script>
and the function is in main page:
            function setTabulatorTitle(tit)
            {
                var tabItem = __objpinTab1.getActiveTabItem();
                tabItem.text = "" + tit;
                tabItem.title = "" + tit;
            }
The problem is that my text of tabs hasn't changed. The tit has a value.
It looks like that control doesn't render text of tabs or something like that.
Any suggestions?

Re: Problems with changing tab text in client mode


fora 04-15-2006, 3:52
I resolved the first problem. I replace:
__objpinTab1.getTabItemByIndex(__objpinTab1.getItems().length - 1);
with:
__objpinTab1.setActiveTab(__objpinTab1.getItems().length - 1);

The problem with text still exists.

Re: Problems with changing tab text in client mode


Pintexx Support 04-18-2006, 7:25

Hi,

setting the .text does not work because the item is not redrawn.

We will provide a setText() method asap.

Regards,
Hans-Peter 

 

 

Re: Problems with changing tab text in client mode


fora 04-21-2006, 9:16
When will be possible to use setText method?
I create an internet page with tabs, and i want to change text to page title, so user can distinguish between tabs.

Re: Problems with changing tab text in client mode


Pintexx Support 04-24-2006, 2:52

Hi,

we have a new fix where this method is now available.

Please goto www.pintexx.com --> support --> Fix

Regards,
Hans-Peter

Re: Problems with changing tab text in client mode


fora 04-28-2006, 11:53
Hi.
I downloaded new version upgrade all dll files and JS scripts, but i get the JS error: Object doesn't suport this property or method.
My code is:
                var tabItem = __objpinTab1.getActiveTabItem();
                tabItem.settext("" + tit);
I also try with setText (T not t)
Any help.
Thanks

Re: Problems with changing tab text in client mode


Pintexx Support 04-28-2006, 2:45

Hi,

its

item.setText("Text");

I tried it again and it works for me.
Did you clear browser cache before running ?
The file date of "tab/include/pinTab.js" must be of 4/27.

Regards,
Hans-Peter

Re: Problems with changing tab text in client mode


fora 04-29-2006, 8:54
Still not working:
                var tabItem = __objpinTab1.getActiveTabItem();
                tabItem.setText("test");
I have cleared the browser cache.
I have the file data 4/24 not 4/27.
I look into your fix and downloaded again the latest fix and all the dates are 4/24.
I use internet explorer, in firefox the text doesn't change, but the error also doesn't accures.

Re: Problems with changing tab text in client mode


Pintexx Support 05-01-2006, 1:47

Hi,

4/24 is OK.

Could you please check if you have a valid tabItem object i.e.

alert(tabItem);

Which mode do you use: grafic(Images) mode or color mode ?
 Does the tab item already had a text after creating ?

If you use the API/client.aspx sample and add this line:

  function getActiveTabItem()
  {
   alert("URL of current tab: " + __objPinTab1.getActiveTabItem().url);
   __objPinTab1.getActiveTabItem().setText("Newtext");
  }

What happens ?

Regards,
Hans-Peter