defining text areas in a sketchpag
Hello,
I'm fairly new to OpenSesame. I'm creating an experiment where on one screen participants read a 2-3 sentence context, then they hear another sentence, and then there's another screen where two questions are displayed on either side of the screen, and they have to choose which is the most appropriate.
At the moment I have the context and question screens as sketchpads, with the text as textline objects. I want to be able to define a box on the context screen, and two boxes on the question screen, which the text will display within, so that the text will wrap to the next line if it's wider than the box. These boxes need to be smaller than the full screen.
I came across this discussion which suggests this is not possible:
The screen size adjustment suggested here wouldn't work for me as the boxes need to be different sizes on different screens...
Is there any other work-around? Is it possible to put text in a canvas object? Can the margins be specified there? I tried reading the documentation on that, but couldn't figure it out.
Any help much appreciated.
Thanks!
Sasha
Comments
Hi Sasha,
So if I understand correctly, your question is simply: How can I constrain the width of text? Right?
A
sketchpaddoesn't allow you to do this, but there are a few solutions you could try:max_widthkeyword of canvas.text() in Python inline script.sketchpadas you're doing now.Cheers!
Sebastiaan
Check out SigmundAI.eu for our OpenSesame AI assistant!
Ah, thank you - I've managed to get it working with canvas.text(). Cheers.