Can't change height of viewable textbox

OS: macOS Sequoia 15.7.9
PsychoPy version: 2026.2.1 3.11
Standard Standalone Installation? (y/n) Yes
Do you want it to also run online? (y/n) No
What are you trying to achieve?:

I display the letter of consent at the beginning of my study with a textbox with scolling enabled. However, when I enable scrolling, the textbox has a very small height (see images); changing the height values of the textbox component does not change the height of the visible box of text. Instead it seems to change the height of the textbox behind the box of what is visible (i.e., the text moves up and gets cut off, but the size of the visible box remains the same). I don’t have this issue for width, only for the height for some reason.

Presumably related: the instructions at the bottom that say to press Y to consent and continue with the study also get cut off and aren’t visible when you scroll as far down as the scroll bar allows (the second image)

What did you try to make it work?: changing the height of the textbox, changing padding, changing border size, changing unit type (i.e., normally set to height, tried changing to cm), making sure that monitor information in monitor center is correct

Ah, I think I see the problem… Internally, TextBox has an Aperture (same as with Aperture Component) which controls the area visible, whose size is set as the same as the TextBox on creation. However, if you set the size of the TextBox after creation, it doesn’t update the size of this Aperture, so the visible area is fixed to whatever it was on creation.

As a workaround, you can either use “constant” in the updates for the “size” param of the TextBox (if it doesn’t need to update each frame/repeat), or you can add this in a Code Component (Each Frame tab):

# set the size of the aperture containing the text (allow an extra 10% width for the scrollbar)
myTextBox.container.size = myTextBox.size * (1.1, 1)
# set the height of the scrollbar
myTextBox.scrollbar.size[1] = myTextBox.size[1]

I’ll put in a fix for this in the long term though

Thank you so much, this worked!!!

If anyone else has run into this problem and is reading this: my size was already set to “constant”, so that didn’t fixed it, but adding the code did!