Large custom slider component

Ignition 7.9.4
I can’t seem to find the radius option for the rectangle component. I believe this feature was added, but I don’t see it in 7.9.4.

My customer would like a custom slider with, among other things, a large finger sized button for an HMI. The existing slider is too small for a finger and really doesn’t look that good.

-Can I create a slider somehow by moving a button component?
-Can I import dynamic objects like this from somewhere else somehow?
-Below are some ideas that might be nice to have for an HMI.


As for making your own - I believe you could, in a couple ways. It depends on how comfortable you are with scripting, though. You can make a template that has a rectangle or circle component or something with a mousePressed/mouseDragged/mouseReleased set of scripts that would use system.gui.transform to move the shape and calculate the value of the slider.

There could also be modules or something out there that adds these, but I haven’t seen any.

1 Like

This is what ended up working for me. The slider is just a push button.

On the parent container we have custom properties where we store the mouse click position and the robot’s speed. On the button, we have a mouse pressed script:

event.source.parent.mouseXOldPos = event.source.x + event.x
event.source.parent.mouseYOldPos = event.source.y + event.y

and a mouse dragged script:

mouseYCurPos = event.source.y + event.y 
mouseYOffset = event.source.parent.mouseYOldPos - mouseYCurPos 
event.source.parent.mouseYOldPos = mouseYCurPos
buttonYNewPos = event.source.y - mouseYOffset 

if buttonYNewPos > 0 and buttonYNewPos < 154:
	system.gui.transform(event.source,newX=4.5,newY=buttonYNewPos,framesPerSecond=120)
	event.source.parent.parent.robotSpeed = (169.89-event.source.y)/1.689

You’ll also have to add a few small system.gui.transform() scripts for buttons (like the 100% speed button), and a script for setting the slider’s position upon opening the parent window.

Thanks for getting me started “mrogers”.

2 Likes