Text wrapping in sketchpad textline -- screen edge workaround not working
Hi all,
To achieve text wrapping in sketchpad textline, I set the resolution smaller than the monitor and hoped it would wrap when it reached the edge. This workaround to the lack of text wrapping for the textline object was suggested in this thread:
http://forum.cogsci.nl/index.php?p=/discussion/comment/11202/#Comment_11202
However, I'm not getting the text wrapping at the edge of the screen.
Details about my setup and experiment:
I have the resolution set to 1024 x 768 in OpenSesame, and I'm using the xpyriment back-end (also tried psycho with similar results). My monitor is 1920 x 1080, and I'm using a Windows 7 PC. I'm displaying survey items in a text box on a sketchpad. The sketchpad is in a sequence in a loop, and the survey items are listed in a column in the loop. When the items display, they run past the edge of the resolution defined in OpenSesame and in a few cases (long items), they run past the edge of the actual monitor and some of the words aren't displayed.
Also, I posted about this in the thread above, but it's marked solved, and I didn't get a reply, so I thought I'd better post a new comment. My apologies if that was the wrong approach
Thanks for any advice you have!
Tom
Comments
Hi Tom,
Well, you caught the first bug to be fixed for 3.1.8! 3.1.7 is being prepared for release as I write this.
Essentially, line wrapping hasn't been updated to support uniform coordinates, i.e. the option where 0, 0 refers to the display center in all cases. You can disable uniform coordinates in the General Properties tab. If you do that, you'll find that text wraps correctly again. But you also end up with the nonsensical behavior where 0, 0 refers to the display in
sketchpad
items but to the top-left incanvas
objects. So pick your lesser evil!Cheers,
Sebastiaan
Check out SigmundAI.eu for our OpenSesame AI assistant!
What an honor to catch the first bug! I'll put that on my CV I split the long items between two columns and it seems to be working, so I'll stick with that method for now. btw, your recent Psych Science paper on pupillary responses to brightness/darkness words was REALLY fascinating!
Hi @sebastiaan and @TomArmstrong ,
I am currently having issues with text wrapping, as I am using a variable to read sentences that are sometimes a bit long and thus are not getting wrapped. I can't manually set the resolution because this will be an online experiment. Can you suggest any fixes for easy text wrapping?
Best wishes,
Elinor
Hi @elinora18 ,
Proper text wrapping is not available for OSWeb, but you can use a simple
inline_javascript
(courtesy of SigmundAI) to limit the text to a specific number of characters, and insert line breaks in between (using HTML<br>
elements) like so. This should be in the prepare phase of aninline_javascript
beforemyText
is shown on asketchpad
:You can also implement more
— Sebastiaan
Check out SigmundAI.eu for our OpenSesame AI assistant!
Hi @elinora18,
Please see my reply to your post about this a few days ago.
https://forum.cogsci.nl/discussion/9427/text-wrapping#latest
Best,
Fabrice.