# Randomise sliders with different labels

**URL:** <https://discourse.psychopy.org/t/randomise-sliders-with-different-labels/31901>\
**Category:** Builder\
**Created:** [November 11, 2022, 4:33pm UTC](https://discourse.psychopy.org/t/randomise-sliders-with-different-labels/31901 "2022-11-11T16:33:30Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![wakecarter](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/wakecarter/32/5753_2.png) [@wakecarter](https://discourse.psychopy.org/u/wakecarter)\
**Post date:** [November 14, 2022, 10:42pm UTC](https://discourse.psychopy.org/t/randomise-sliders-with-different-labels/31901/2 "2022-11-14T22:42:05Z")

</div>

This thread might help.

> [@How to set slider values to variable from .xlsx?](https://discourse.psychopy.org/t/how-to-set-slider-values-to-variable-from-xlsx/21894/8):
>
> Setting labels after initialisation is difficult, but not impossible! If you have the same number of labels each time, you could do this: # Get labels list for this routine labels = efflabels.split(",") # For each label... for i, obj in enumerate(mySlider.labelObjs): # ...set its text to be the corresponding value in labels, and store this in the slider obj.text = mySlider.labels[i] = labels[i] (the initial value of labels would need to be the same number of values as in efflabels sepa…

---

_[View the full topic](https://discourse.psychopy.org/t/randomise-sliders-with-different-labels/31901)._
