<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Determining Active Tab Number as String in Vuforia Studio</title>
    <link>https://www.ptcusercommunity.com/t5/Vuforia-Studio/Determining-Active-Tab-Number-as-String/m-p/651147#M7637</link>
    <description>&lt;P&gt;Regarding this post:&amp;nbsp;&lt;A title="Determining Active Tabs" href="https://community.ptc.com/t5/Vuforia-Studio/Determining-Active-Tabs/m-p/593867#M5055" target="_blank" rel="noopener"&gt;Determining Active Tabs&lt;/A&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Using the proposed solution, when a button is pressed, I would like a label to display the current active tab number.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My attempt is below but this currently isn't working. Any advice would be appreciated.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;$scope.buttonPress = function(){
  var tabID = $scope.testClickTab();
  $scope.setWidgetProp( "label-9", "text", tabID);
}


$scope.testClickTab=function(key) {
	angular.forEach( 
   	$element.find('twx-tab'), function(value, key) {
      if(value['style']['display']=='block') console.error(key); 
 } )
};&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 26 Feb 2020 16:11:58 GMT</pubDate>
    <dc:creator>rhudd</dc:creator>
    <dc:date>2020-02-26T16:11:58Z</dc:date>
    <item>
      <title>Determining Active Tab Number as String</title>
      <link>https://www.ptcusercommunity.com/t5/Vuforia-Studio/Determining-Active-Tab-Number-as-String/m-p/651147#M7637</link>
      <description>&lt;P&gt;Regarding this post:&amp;nbsp;&lt;A title="Determining Active Tabs" href="https://community.ptc.com/t5/Vuforia-Studio/Determining-Active-Tabs/m-p/593867#M5055" target="_blank" rel="noopener"&gt;Determining Active Tabs&lt;/A&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Using the proposed solution, when a button is pressed, I would like a label to display the current active tab number.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My attempt is below but this currently isn't working. Any advice would be appreciated.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;$scope.buttonPress = function(){
  var tabID = $scope.testClickTab();
  $scope.setWidgetProp( "label-9", "text", tabID);
}


$scope.testClickTab=function(key) {
	angular.forEach( 
   	$element.find('twx-tab'), function(value, key) {
      if(value['style']['display']=='block') console.error(key); 
 } )
};&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 26 Feb 2020 16:11:58 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Vuforia-Studio/Determining-Active-Tab-Number-as-String/m-p/651147#M7637</guid>
      <dc:creator>rhudd</dc:creator>
      <dc:date>2020-02-26T16:11:58Z</dc:date>
    </item>
    <item>
      <title>Re: Determining Active Tab Number as String</title>
      <link>https://www.ptcusercommunity.com/t5/Vuforia-Studio/Determining-Active-Tab-Number-as-String/m-p/651318#M7641</link>
      <description>&lt;P&gt;&lt;div class="lia-vid-container video-embed-center"&gt;&lt;div id="lia-vid-J4amQ4ajE6tgPnppOMRzf1Mr2vAXM7uNw704h720r538" class="lia-video-brightcove-player-container"&gt;&lt;video-js data-video-id="1667783346378081002" data-account="6058022026001" data-player="default" data-embed="default" class="vjs-fluid" controls="" data-application-id="" style="width: 100%; height: 100%;"&gt;&lt;/video-js&gt;&lt;/div&gt;&lt;script src="https://players.brightcove.net/6058022026001/default_default/index.min.js"&gt;&lt;/script&gt;&lt;script&gt;(function() {  var wrapper = document.getElementById('lia-vid-J4amQ4ajE6tgPnppOMRzf1Mr2vAXM7uNw704h720r538');  var videoEl = wrapper ? wrapper.querySelector('video-js') : null;  if (videoEl) {     if (window.videojs) {       window.videojs(videoEl).ready(function() {         this.on('loadedmetadata', function() {           this.el().querySelectorAll('.vjs-load-progress div[data-start]').forEach(function(bar) {             bar.setAttribute('role', 'presentation');             bar.setAttribute('aria-hidden', 'true');           });         });       });     }  }})();&lt;/script&gt;&lt;a class="video-embed-link" href="https://www.ptcusercommunity.com/t5/video/gallerypage/video-id/J4amQ4ajE6tgPnppOMRzf1Mr2vAXM7uN"&gt;(view in My Videos)&lt;/a&gt;&lt;/div&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;// $scope, $element, $attrs, $injector, $sce, $timeout, $http, $ionicPopup, and $ionicPopover services are available



function isHidden(el) {
    return (el.offsetParent === null)
}


angular.element(document).ready(function () {

	//$scope.ShowTabState();  

});


$scope.ShowTabState = function() {
    var tabs = document.getElementsByClassName("tab");
  	for(i=0; i&amp;lt;tabs.length; i++) {      	
        if(isHidden(tabs[i]) == false) {
          	$scope.app.view.Home.wdg["label-1"].text = "Current Tab " + i;
        }    
    }
}&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is this the behaviour you want?&lt;/P&gt;</description>
      <pubDate>Thu, 27 Feb 2020 09:49:20 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Vuforia-Studio/Determining-Active-Tab-Number-as-String/m-p/651318#M7641</guid>
      <dc:creator>tincescu</dc:creator>
      <dc:date>2020-02-27T09:49:20Z</dc:date>
    </item>
    <item>
      <title>Re: Determining Active Tab Number as String</title>
      <link>https://www.ptcusercommunity.com/t5/Vuforia-Studio/Determining-Active-Tab-Number-as-String/m-p/651321#M7642</link>
      <description>&lt;P&gt;My approach is this.&lt;/P&gt;
&lt;P&gt;We check in the ShowTabState what elements with the class tab are visible on the screen (in our case it will be always one).&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="tincescu_0-1582797109009.png" style="width: 400px;"&gt;&lt;img src="https://www.ptcusercommunity.com/t5/image/serverpage/image-id/24002i027226477FFE332E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="tincescu_0-1582797109009.png" alt="tincescu_0-1582797109009.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Then we call this funtion when the button is pressed.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="tincescu_1-1582797122658.png" style="width: 400px;"&gt;&lt;img src="https://www.ptcusercommunity.com/t5/image/serverpage/image-id/24003i8804B4DA6768A490/image-size/medium?v=v2&amp;amp;px=400" role="button" title="tincescu_1-1582797122658.png" alt="tincescu_1-1582797122658.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 27 Feb 2020 09:53:50 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Vuforia-Studio/Determining-Active-Tab-Number-as-String/m-p/651321#M7642</guid>
      <dc:creator>tincescu</dc:creator>
      <dc:date>2020-02-27T09:53:50Z</dc:date>
    </item>
    <item>
      <title>Re: Determining Active Tab Number as String</title>
      <link>https://www.ptcusercommunity.com/t5/Vuforia-Studio/Determining-Active-Tab-Number-as-String/m-p/651452#M7644</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://www.ptcusercommunity.com/t5/user/viewprofilepage/user-id/309388"&gt;@tincescu&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Yes, that's exactly what I'm looking for, thank you very much&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":beaming_face_with_smiling_eyes:"&gt;😁&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also, I appreciate the video, it helps to make communication clear and is a nice touch &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For clarity, should anyone else use this approach, 'tab' is entered as the class for each individual tab, not for the tab object as a whole. I made this mistake initially.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Many thanks&lt;/P&gt;</description>
      <pubDate>Thu, 27 Feb 2020 17:14:56 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Vuforia-Studio/Determining-Active-Tab-Number-as-String/m-p/651452#M7644</guid>
      <dc:creator>rhudd</dc:creator>
      <dc:date>2020-02-27T17:14:56Z</dc:date>
    </item>
  </channel>
</rss>

