Help Aligning Two Text Phrases Extending Outward from Fixed Points

OS (e.g. Win10): Mac Sequoia Version 15.0.1
PsychoPy version (e.g. 1.84.x): v2024.2.4
Standard Standalone: y

Hi everyone,

I’m working on a PsychoPy experiment and trying to align two strings on the screen so they extend outward from fixed points (x = -0.1 and x = 0.1) relative to the center of the page.

My goal is to ensure the text phrases start at these points and extend outward (left for one phrase and right for the other), without overlapping regardless of the length of the phrases.

Here’s the custom code I’ve been using:

textLeft.alignText = ‘center-right’

textRight.alignText = ‘center-left’

However, this doesn’t seem to anchor the text boxes to the intended positions. Instead, the text overlaps or behaves unpredictably (screenshot attached).

Can anyone advise please? Thank you.

Use text boxes with anchor and align set to right and left respectively.