Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Supported by

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:

http://forum.cogsci.nl/index.php?p=/discussion/1217/solved-formatting-sektchpad-textline-margins-alignment-etc

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 sketchpad doesn't allow you to do this, but there are a few solutions you could try:

    • Use forms, which give you a lot of control over the layout of text, buttons, etc.
    • Use the max_width keyword of canvas.text() in Python inline script.
    • Manually add line breaks to your text, and use a sketchpad as you're doing now.

    Cheers!
    Sebastiaan

  • Ah, thank you - I've managed to get it working with canvas.text(). Cheers.

Sign In or Register to comment.