# Slider: Making the dot size smaller without changing overall slider size

**URL:** <https://discourse.psychopy.org/t/slider-making-the-dot-size-smaller-without-changing-overall-slider-size/7649>\
**Category:** Builder\
**Created:** [May 6, 2019, 8:42pm UTC](https://discourse.psychopy.org/t/slider-making-the-dot-size-smaller-without-changing-overall-slider-size/7649 "2019-05-06T20:42:34Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![StefKoeb](https://avatars.discourse-cdn.com/v4/letter/s/91b2a8/32.png) [@StefKoeb](https://discourse.psychopy.org/u/StefKoeb)\
**Post date:** [May 6, 2019, 8:42pm UTC](https://discourse.psychopy.org/t/slider-making-the-dot-size-smaller-without-changing-overall-slider-size/7649/1 "2019-05-06T20:42:35Z")

</div>

Hi, I’ve got an experiment where the participants have to rate a picture using a slider. The symbol on that slider which they have to move onto a certain position, is a dot. Unfortunately, the dot of the slider is wayyy to big and I want to make it smaller, but I have no idea how to do that. It needs to stay a dot and the overall slider size on screen must not change (as it indicates a certain height of the picture).

I’m an inexperienced student of psychology and I have absolutely 0 coding skills in python, which is why I use the Builder. Apart from that dot problem, everything is working as planned. So what I really love to know is how to make the dot size of the slider smaller. Thank you!

---

<div class="post-metadata">

**Author:** ![dvbridges](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/dvbridges/32/1918_2.png) [@dvbridges](https://discourse.psychopy.org/u/dvbridges)\
**Post date:** [May 6, 2019, 8:50pm UTC](https://discourse.psychopy.org/t/slider-making-the-dot-size-smaller-without-changing-overall-slider-size/7649/2 "2019-05-06T20:50:14Z")

</div>

> [@Refining scale markers](https://discourse.psychopy.org/t/refining-scale-markers/7523/4):
>
> Oh in that case, you can easily change the size of the marker using a code component. In the “Begin Routine” tab of the code component, assuming your Slider is called slider and you are using height units for sizing: slider.marker.size=(.1,.1)

---

<div class="post-metadata">

**Author:** ![StefKoeb](https://avatars.discourse-cdn.com/v4/letter/s/91b2a8/32.png) [@StefKoeb](https://discourse.psychopy.org/u/StefKoeb)\
**Post date:** [May 8, 2019, 1:25pm UTC](https://discourse.psychopy.org/t/slider-making-the-dot-size-smaller-without-changing-overall-slider-size/7649/3 "2019-05-08T13:25:45Z")

</div>

Thank you, but I get an error message for that. ![slider](https://us1.discourse-cdn.com/flex002/uploads/psychopy/original/3X/2/7/2713933003a0812ce9d40cdf70791fe647d14ede.jpeg)

---

<div class="post-metadata">

**Author:** ![dvbridges](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/dvbridges/32/1918_2.png) [@dvbridges](https://discourse.psychopy.org/u/dvbridges)\
**Post date:** [May 8, 2019, 1:35pm UTC](https://discourse.psychopy.org/t/slider-making-the-dot-size-smaller-without-changing-overall-slider-size/7649/4 "2019-05-08T13:35:48Z")

</div>

So there are a few things wrong here. You are creating a Slider object called sliderTrial2. Only after the object has been created, can you call the line of code to change the marker size. You would not pass the line of code as an argument to the Class which creates the object because it does not exist at that point. Also, the line of code I gave was for changing the marker size of a Slider object called “slider” - lowercase. In your case, you will want to use `sliderTrial2.marker.size = (.1, .1)`. Last thing, you can do this from a code component because when you change the code in Coder, it will get overwritten every time you run the experiment from Builder. So, add a code component, in the “Begin Routine” tab, add `sliderTrial2.marker.size = (.1, .1)`.

---

<div class="post-metadata">

**Author:** ![StefKoeb](https://avatars.discourse-cdn.com/v4/letter/s/91b2a8/32.png) [@StefKoeb](https://discourse.psychopy.org/u/StefKoeb)\
**Post date:** [May 9, 2019, 7:55am UTC](https://discourse.psychopy.org/t/slider-making-the-dot-size-smaller-without-changing-overall-slider-size/7649/5 "2019-05-09T07:55:57Z")

</div>

Thank you so so much for your help! Nobody at my department was able to help me, but now it’s working just fine, thanks to you! You might have saved my bachelor thesis.

---

<div class="post-metadata">

**Author:** ![Marc\_Buehner](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/marc_buehner/32/3476_2.png) [@Marc\_Buehner](https://discourse.psychopy.org/u/Marc_Buehner)\
**Post date:** [July 30, 2019, 12:21pm UTC](https://discourse.psychopy.org/t/slider-making-the-dot-size-smaller-without-changing-overall-slider-size/7649/6 "2019-07-30T12:21:01Z")

</div>

Hi David,

I am trying to do the same on JS but get this error

- **TypeError: undefined is not an object (evaluating ‘slider.marker.size=(.1,.1)’)**  
How can I change the marker size online?  
It appears much bigger online than at local install.  
THanks  
Marc

---

<div class="post-metadata">

**Author:** ![ile](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/ile/32/7800_2.png) [@ile](https://discourse.psychopy.org/u/ile)\
**Post date:** [April 20, 2020, 10:23am UTC](https://discourse.psychopy.org/t/slider-making-the-dot-size-smaller-without-changing-overall-slider-size/7649/7 "2020-04-20T10:23:11Z")

</div>

How have you solved this error? I am getting the same when I try to run the task on Pavlovia
