Howdy, Stranger!

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

Supported by

text input box location

Hi,

In my experiment, I have a text input box, but it's not in the center of the screen, it's aligned to the left. I've tried to change its location by changing the numbers in the widget (0,0), but I couldn't move it to the center of the screen. How can I do that?

Thank you for your help!

Hadas

1.png 146.1K

Comments

  • Hi,

    If you set the text_input to pop up at (0,0) it will always be in the top left corner. Especially, if you don't specify the dimension of your form.

    So, I recommend you have another look at the documentation:
    http://osdoc.cogsci.nl/3.1/manual/forms/custom/#creating-forms-using-python-inline-script

    But basically, if you have a 3x3 matrix and put the text form in the middle, you have what you want: see here

    from libopensesame import widgets
    form = widgets.form(exp,cols=[1,1,1], rows=[1,1,1])
    textI = widgets.text_input(form, var='response',return_accepts = True, center = True, frame = True, stub='')
    form.set_widget(textI, (1,1))
    form._exec(focus_widget=textI)
    

    Hope this helps,
    Eduard

Sign In or Register to comment.