I’ve just added a new demo to my online demos post.
This shows a PsychoPy slider object which can be moved using the left and right arrow keys or hovering over the slider with the mouse. Responses are submitted with a mouse click or the return key. The position of the slider is also recorded every 3 frames and presented on the screen in addition to being saved to the console and the data file.
However, I still need some help with a couple of points.
I have tried unsuccessfully to change the colour of the marker and the wrap width of the labels online using the following code:
for label in slider.labelObjs: label.height = .03 # Or whatever size you want label.wrapWidth = .2 label.text=slider_labels.pop(0) slider.marker.color=blue
slider.setLabels(slider_labels); slider.setLabelHeight(.03); //slider.setLabelWrapWidth(.2); slider._markerColor = blue; slider._markerSize = (.1,.1); //slider._onChange(true)(); //slider._setupSlider();
This seemed to work offline, but not online
Suggestions welcome remembering that I want it to work in the same way both offline and online.
Links I’ve looked at: