Is there any way to change the width of the scroll bars on a Table Component? I would like to use the table in a mobile app, but I have fat fingers and it is difficult to navigate the table.
Thanks.
Is there any way to change the width of the scroll bars on a Table Component? I would like to use the table in a mobile app, but I have fat fingers and it is difficult to navigate the table.
Thanks.
You can use getVerticalScrollBar() and setPreferredSize() from Javaâs ScrollPaneLayout, which is from Java Swing (which Ignition uses). An example:
[code]from java.awt import Dimension
from java.lang import Integer
new_scrollbar_width = Dimension(25, Integer.MAX_VALUE)
comp = system.gui.getWindow(âWindowNameâ).getRootContainer().getComponent(âTableâ)
comp.getVerticalScrollBar().setPreferredSize(new_scrollbar_width)
system.gui.resizeComponent(comp,comp.getWidth()+1,comp.getHeight()+1)
system.gui.resizeComponent(comp,comp.getWidth()-1,comp.getHeight()-1)[/code]
Would this code be put on the component somewhere? Where does it need added?
I also have a similar need to increase the size of the scroll bar.
Its not on mobile but same principle.
It just depends on when or how often you want to change the scrollbar width. If youâre just making a static change to the scrollbar width in the designer, you can go to Tools -> Script Playground and put the script in there. If you want a user to change the width while using the client, you can use a button/pop-up window to prompt the user to change the value, or use a numeric text field. If you need it to dynamically change at a certain time or when a tag changes, you can use a gateway startup script. There are many different implementations that can be applied.
Hello,
May i do it to an easychart component? To the verticalscrollbar from the tagpens?
Thank you.
If this is a touchscreen application, you can make all the scroll bars larger in a project by going to project->Properties->Client->General->Touch Screen Mode Enabled->Scrollbar Width
Exactly, it´s for a touch screen application.
Thank you very much.