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?
I think I found the cause of the problem: my psychopy can not dispaly Chinese, when I check the data excl, I found these ▯▯▯ are Chinese characters. In the trail before the routine with textbox(“inputans” in the image), the participents need to press the keyboard three times(f or j), the three letters can become three Chinese characters by Chinese keyboard( Chinese pinyin input method). In other words, whatever the first key typed in textbox routine is, it become the three letters in last trail, and then become Chinese charaters which can not display
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 + " ") textbox.draw()
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!