| Reference | Downloads | Github

TextBox: specified height size works locally, but isn't translated to pavlovia

git: textBox 2020.2.4


Description of the problem: I’m testing out the new TextBox to use online for free response collection (editable). Two aspects aren’t working on pavlovia:

  1. The edited response text is not saved in the output file-- looks like this is already being addressed here so hopefully that’ll work soon!
  2. The textbox size specified via gui is not reflected when running online. I just have “Type here” and then a larger specified size so that the ptp can type a lot and see the text wrap around (rather than be one long line).
    Width works (I change width via gui, the change is reflected in pav), but however I change the height. it remains the size of one line of text.
    I tried adding a 2 additional lines of text to the textbox (to see if that’d force it to increase height), but the height on pavlovia is still the size of one text line, and appears to be centered on the middle line (see below).

This is surprising given the textBox chunk in the textBox.js file:

function experimentInit() {
  // Initialize components for Routine "textBox"
  textBoxClock = new util.Clock();
  text = new visual.TextStim({
    win: psychoJS.window,
    name: 'text',
    text: "What strategies did you use to help you learn the pairs?\n\nPlease fill out the text box below, and press the 'right' arrow key to proceed once you've finished your response.",
    font: 'Arial',
    units: undefined, 
    pos: [0, 0.2], height: 0.04,  wrapWidth: undefined, ori: 0,
    color: new util.Color([(- 1.0), (- 0.498), (- 0.498)]),  opacity: 1,
    depth: 0.0 
  TextBox = new visual.TextBox({
    win: psychoJS.window,
    name: 'TextBox',
    text: 'Type here\napples and oranges\ncars',
    font: 'Arial',
    pos: [(- 0.35), 0], letterHeight: 0.03,
    size: [0.7, 0.4],  units: undefined, 
    color: [(- 1.0), (- 1.0), (- 1.0)], colorSpace: 'rgb',
    fillColor: [0.506, 0.506, 0.506], borderColor: [(- 1.0), (- 1.0), (- 1.0)],
    bold: false, italic: false,
    opacity: 1,
    padding: 0.015,
    editable: true,
    anchor: 'top-left',
    depth: -1.0 

How best to specify textBox height size for pavlovia?

Hey @sawal, many thanks for flagging, your report is extremely helpful. I have now raised the issue on GitHub and should be coming up with a fix before too long. Thank you, s.

1 Like

Hi @sotiri, it looks like this issue is closed on Github now, but I just downloaded 2020.2.5 and am having the same issue where the textbox height on pavlovia doesn’t reflect what’s set-up in Builder.

Is this still in progress?

Hi @sawal, sorry about this, a fix is still pending I’m afraid. Closed is a duplicate issue (No. 182) referenced alongside it. Thanks again for your patience while we look for a solution :blush:

Hi @sotiri, thanks for letting me know. Might you have a sense on timing? This is the last part of an experiment I’ve been developing for quite awhile that I really hoped to get live ASAP. Any code components I can add as a temp fix? Thanks for your response!

Hi @sawal, I understand totally, first thing Monday I’ll be taking another look, hope that’s OK, x

1 Like

Thank you, @sotiri!

Hey @sawal, while a permanent fix is on the way, please could you give me developer access so that I can patch PsychoJS in place for you, thanks, x

@sotiri done, thank you!

1 Like

Hi @sotiri, any updates on this? Thank you again for helping me with a temp fix!

No worries @sawal, as soon as the relevant PR is merged I will be making sure to follow up here to let you know, thanks for your patience, x

1 Like