On 5/24/21 3:18 PM, Paul Dupuis via use-livecode wrote:
Hi all,

I am looking to see if anyone has a 3-positions slider control they might be willing to share. I need a control that has a "left, middle, and Right" positions (whatever they are called). Prefer horizontal orientation and resizable so I can adjust the size to the screen area where it needs to go, but I can resize graphics if needed.

You can do this with LC's built-in horizontal scrollbar. Drag a Slider control to the card. Set the start value to 1 and the end value to 3. By default there will be numbers displayed but you can turn those off and use labels underneath instead.

Put this script into the slider. It should make the slider snap to one of the 
three positions:


on scrollBarDrag
  set the thumbPos of me to the thumbpos of me mod(4)
end scrollBarDrag

If you want to change the color, use an effects overlay. None of the built-in color properties apply.


--
Jacqueline Landman Gay         |     jac...@hyperactivesw.com
HyperActive Software           |     http://www.hyperactivesw.com

_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to