Tag Strip Feature Request to make scroll arrows wider

Hi,

On multiple projects, I’ve used the Tab Strip component, and had more tabs than fit on the screen. Ignition handles this with arrows you can click (or hold, as people are often surprised to find out) to scroll to the other tabs.

Unfortunately, on touchscreens, these arrows are very narrow and users struggle to accurately hit them - often accidently going to other tabs.

Could we get a property like ‘Scroll Arrows Width’ or something to make these arrows easier to touch on a touchscreen?

You could try adding something like this to the windows internalFrameActivated event handler

import java.awt.Dimension as dimension

# Get the tab strip component, assuming it's on the root container
tabStrip = event.source.rootContainer.getComponent('Tab Strip')
# Get the arrow panel
tsArrows = tabStrip.getComponent(0)
# Set its preferred size
size = dimension(width=200,height=80)
tsArrows.setPreferredSize(size)
2 Likes

In my case I have a tab strip on the root container but that is not the tab strip I want to change the size of. I have a tab strip for some of the internal windows. The tab strip I want to set the size for is under a container called "Maint" which is under another container called "MainContent" which is then under the Root Container (Capitalized R and C and a space in Root Container). How could I set the top level faceplate pop up InternalFrameActivated script to drill down and set that tab strip arrow size? I tried your code and manipulated it as tabStrip = event.source.parent.parent.parent.getComponent('Tab Strip') and that through a script error that the getComponent 1st argument can't be coerced into an integer. I also tried tabStrip = event.source.rootContainer.MainContent.Maint.getComponent('Tab Strip')

Note also that Vision's touchscreen mode has a setting for this.

https://docs.inductiveautomation.com/display/DOC81/Using+Touch+Screen+Mode#UsingTouchScreenMode-EnablingTouchScreenMode

Thanks for pointing that out! I will see how this works on a touchscreen

Is that the width of tap strip arrows, or the scrollbar on the side of the screen / on components that don't fit their space?

I'm pretty sure that is the scrollbar.
If you must adjust your arrow button size with scripting, here is a simple recursive function that will do it:

from com.inductiveautomation.factorypmi.application.components.util import HoldDownArrowButton
from com.inductiveautomation.factorypmi.application.components.tabstrip import LeftRightArrowPanel
from java.awt import Dimension
tabStrip = system.gui.getParentWindow(event).getComponentForPath('Root Container.Tab Strip')
arrowHeight = 50
arrowWidth = 50
def tabStripArrowEditor(tabStrip):
	if tabStrip.componentCount > 0:
		for component in tabStrip.getComponents():
			if isinstance(component, LeftRightArrowPanel):
				size = Dimension(arrowWidth*2,arrowHeight)
				component.setPreferredSize(size)
				component.setSize(size)
				tabStripArrowEditor(component)
				return
			elif isinstance(component, HoldDownArrowButton):
				size = Dimension(arrowWidth,arrowHeight)
				component.setPreferredSize(size)
				component.setSize(size)
			else:
				tabStripArrowEditor(component)
tabStripArrowEditor(tabStrip)

Before and after result:
image
image

Note: the height will be limited by the height of the tab strip

2 Likes