OS : Win11
PsychoPy version : v2022.1.1
- I want participants to enter a few numbers, so I use the Textbox. When the program runs, but the first digit entered each time cannot be displayed.(just display▯▯▯) However, these ▯▯▯can be removed by “backspace”, then continue typing and the display will be normal. How can I slove it?
Please could you show a screenshot of your textbox component?
Thanks for your reply. The last image is what I typed in “123”, but “1” is ▯▯▯.
Ah – that explains it.
You could try textbox.refresh() in Begin Routine to clear the new textbox.
Thanks for your reply! But there was an error when I tried: AttributeError: ‘TextBox2’ object has no attribute ‘refresh’.
In addition, I also asked this question on a forum in my county, I just got a response from a person and he gave me this code:
textbox.setText(textbox.text + " ")
So far, it seems to be working. But I don’t understand what these codes mean or if they make sense(because the situation that bothers me sometimes comes up and sometimes doesn’t), So I would like to trouble you to see if this is reasonable. Thanks again!
oh no, the problem comes uo again! It seems that the above code does not solve the problem.