| Reference | Downloads | Github

Text component does not appear on the screen

Hi all,

First of all, I want to thanks people in this forum. I made an experiment using slider with keyboard input and it worked fine for your enormous helps.

This time I tried to make a practice trial which include key instructions using text component in builder view. This sounds easy, but when I added an additional text component, the text fail to be appear on the screen.

My slider routine consists of the following components:

First, code_8 set random anchor as:

Current_anchor = randint(0,101)

code 9 for keyboard control over slider, at begin routine:


and at each frame as codeJS:

arrowKeys = psychoJS.eventManager.getKeys({keyList:['left', 'right']});
if (arrowKeys.includes('left')) {
if (arrowKeys.includes('right')) {

code 12 is for preventing key press and instruction text.

at begin routine:

response_wait = False
text_instr = f'adjust slider using left and right arrow

, at Each Frame:

if 'left' in arrowKeys or 'right' in arrowKeys:
    response_wait = True
    text_def = f'Make a response by pressing arrow down.'

and my textStim is:


The problem as indicated above is that this text component does not appear on the screen with the slider. What prevents the textStim from being on the screen?

(Sld_img is an image at the center of the screen which changes with slider values and it seems nothing to do with this issue.)

Thank you

Some things to try out (just to pinpoint the problem). Do any of the scenarios below work out?

  • Move text to top of timeline
  • Put a fixed text in the Text, like “Testing 123”
  • Disable the slider

It sounds odd… I’ve tried the things you listed and synced my original backup code (the same thing above), but the text appears from nowhere! Anyway, thank you for answer!

Then I’d like to take look if that’s OK. Could you share it via gitlab with tpronk? Searching for experiments on Pavlovia — PsychoPy v2021.1

No problem. I added you as a developer to my project.

I just read your post more carefully. Did you mean that the text does appear, so the problem is fixed?

Sorry for confusing words. The text successfully appeared and problems were solved, though I dont know how it was fixed.

1 Like

No worries, happy it worked out (though in mysterious ways :slight_smile: