TextBox2 clipping/scroll area from one routine affects another routine

OS: macOS 26.3.1 (25D2128)
PsychoPy version: 2026.1.0
Installation: Standard Standalone
Run online: Yes

What are you trying to achieve?
I want to show long texts in scrollable containers of different sizes in different Builder routines.

What did you try?
I am using TextBox2 components in multiple routines.
Both text boxes use overflow=‘scroll’, but they have different sizes.

For example:

  • Routine 1: large scrollable TextBox2

  • Routine 2: another scrollable TextBox2 with a different height

Expected behaviour
Each TextBox2 should clip/scroll only within its own box size.

Observed behaviour
The clipping region of one TextBox2 seems to affect the other one across routines.
More specifically, the clipping of the TextBox2 in the second routine seems to determine the visible/clipped area of the TextBox2 in the first routine.

This happens even though the text boxes are in different routines and have different sizes.

Relevant thread I found
Textbox sizing / clipped viewable information

Screenshots
Screenshot 1: first routine
Screenshot 2: second routine

Question
Is this a known TextBox2 issue across routines?
Is there a reliable way to reset the clipping/scroll state between routines?

Help is very much appreciated! :slight_smile:

deb1_body_text_2 = visual.TextBox2(
     win, text='...',
     ori=0.0, pos=(-0.03, -0.04), draggable=False, units='height', letterHeight=0.025,
     size=(1.5, 0.8), borderWidth=2.0,
     ...
     padding=0.03, alignment='top-left',
     anchor='center', overflow='scroll',
     fillColor=None, borderColor='black',
     ...
     name='deb1_body_text_2',
)
information_text_2 = visual.TextBox2(
     win, text='...',
     ori=0.0, pos=(-0.03, -0.04), draggable=False, units='height', letterHeight=0.03,
     size=(1.5, 0.5), borderWidth=2.0,
     ...
     padding=0.03, alignment='top-left',
     anchor='center', overflow='scroll',
     fillColor=None, borderColor='black',
     ...
     name='information_text_2',
)

Are you creating the textboxes in a code component, or with textbox components.

This issue was previously traced to the scroll overflow method. Please could you try other options to identify whether it’s the same thing?

Hi :slight_smile: thank you for your reply and the reference to the other post.

I’m creating the textboxes through the builder with the textbox component.

If I change the textbox in routine 2 (information_text_2), from overflow=’scroll’ to ‘visible’ the wrong clipping of the textbox in routine 1 (deb1_body_text_2) disappears and the text is displayed correctly. But then of course the clipping of information_text_2 in routine 2 is not correct as it is set to ‘visible’ (see screenshots).

If I add (information_text_2.container.disable()) as a code component (as suggested by TParsons) in Begin Experiment to routine 2 after creating the textbox it doesn’t change anything.

I created a test experiment to further explore the issue. It seems like the component in the last routine always sets the viewable window for all previous components. A form component does the same by the way.

clipping_test.psyexp (43.4 KB)

form_routine3_testitems.xlsx (22.6 KB)