Skip to main content
12-Amethyst
October 13, 2021
Solved

Add different image/icon for each tab in ptcstabset

  • October 13, 2021
  • 1 reply
  • 2211 views

I'm using ThingWorx 9.1.6-b746 and want to add different image/icon for each tab in ptcstabset. Unfortunately using the standard style properties is not possible. Is there a way to do? I tried to use CSS but having problem to select and add the image to a specific tab.

 

Thanks in advance 🙂

Best answer by slangley

Hi @NP_01_10043951. 

 

Short of developing your own widget, I don't have another solution.

 

Note that we have received no date for removal of the deprecated widgets, so using a legacy widget would still be an option.  The replacement may at some point we updated with the missing features and you could update it at that time.

 

Regards.

 

--Sharon

1 reply

Support
October 20, 2021

Hi @nikkolasep.

 

It looks like you'll need to use one of the legacy tab widgets for now.  You can find the legacy widgets by selecting Legacy in the Category field.

 

Regards.

 

--Sharon

12-Amethyst
October 26, 2021

Hi Slangley,

 

thanks for your response. You're right, there is an older type version of tab widget, which allows adding image on it. But unfortunately this widget will soon be deprecated and I would like to make it on the newer tab widget version, which doesn't allow adding image directly via properties.

 

There is another suggestion to use custom css below:

.widget-ptcstabset::part(tabs-tab-label){
font-size: 0px !important;
background-image:url("/Thingworx/FileRepositories/SystemRepository/download.png") !important;
}

 

The issue with this method is that, this only allows us to give all tabs same background image or in other words we are still unable to give different background images to each tab.

 

I'm looking forward to further tips or solutions.

 

slangleyCommunity ManagerAnswer
Support
October 26, 2021

Hi @NP_01_10043951. 

 

Short of developing your own widget, I don't have another solution.

 

Note that we have received no date for removal of the deprecated widgets, so using a legacy widget would still be an option.  The replacement may at some point we updated with the missing features and you could update it at that time.

 

Regards.

 

--Sharon