Hi everyone,
I’m new to PsychoPy, and I’m running into a problem when drawing stimuli on the screen. Right now, I have several stimuli up on the screen at once, and I want a blue border to appear around one of these stimuli when the participant selects it with a keypress. The following code triggers when the participant selects a stimulus:
myShapeStim.setLineWidth(30)
myShapeStim.setLineColor('#48d1cc')
win.flip(clearBuffer=False)
Of course, this by itself draws a border around that one ShapeStim and causes everything else on the screen (including alternative stimuli, text prompts, etc.) to disappear.
I’ve tried to fix this by setting autoDraw=True on each of the stimuli on the page. This works fine for ShapeStim, but when I try to set autoDraw=True on TextStim, I get this error:
TypeError: __init__() got an unexpected keyword argument 'autoDraw'
This is confusing, because the documentation for TextStim clearly states that I should be able to set autoDraw as an option:
autoDraw
Determines whether the stimulus should be automatically drawn on every frame flip.
Value should be: True or False. You do NOT need to set this on every frame flip!
So, my questions are:
- Why isn’t autoDraw working for TextStim?
- Is there another, more compact way of keeping the screen from clearing when a border is drawn around one of the stimuli?
Thanks for your help!
Best,
Natalia