Thanks for the prompt response. Based on your suggestion, I put the following line in the Begin Routine tab of a code component (in Python window). My slider name is item1.
Let me know if I did something wrong. All I get is a blank page but when I click on the page (roughly where the radio buttons should be) I get a big red dot but there are no labels.
Hey,
Is item1 the name of your slider in the builder?
If not, can you please share the experiment you are working on? Maybe only with the relevant part.
It works! The reason the text wasn’t showing up is that I am using a white background. When using your win method, it sets to defaults for ticks and color regardless of what is set in builder.
Can you explain why your method works and why my original method did not? If I use your method, it seems like I am bypassing builder so I’ll have to use a bunch of other lines to set colors, ticks, etc.
Hello Ken,
In your original method, did you set the color of the text to be different than the color of your background? I wasn’t sure if this is something you found out accidentally using my method or if it’s something else.
I also tried replicating your method, and I am unsure why it doesn’t work. I tried accessing the labels through an external variable, in a spreadsheet, but nothing seemed to work.
It seems like updating the label after initializing it is problematic.
No. I had the color set to black for labels via builder. However, I just noticed that there was an error in the JS version. Using single quotes at least got rid of that error but it still didn’t work. I even tried putting this line in Each Frame tab. That didn’t work either.
item1.labels = (‘option1’,‘option2’)
I guess in future I will be forced to use your method. Hopefully someone can figure this out.
I couldn’t find a better solution than manually creating the slider through code. I hope someone else find a better solution because the current one is not trivial.