Howdy, Stranger!

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

Supported by

[open] Can't change background color in form_text_input

edited May 2013 in OpenSesame

Hi there again,

I want to make some forms with some performance tasks. Also I want to have in each form different background color.
I use Opensesame script in form_text_input, and I already managed to make that forms with some tasks. But the problem is that I don't know what opensesame script to use to change colors of background and of the letters.

What can I use to set a color for background and a different color for text?

Thank you.

PS: Definetly one of the best and helpful software for making experiments. Thank you for this.

Comments

  • edited 2:17PM

    I want to have in each form different background color.

    You may want to take a look at this discussion:

    PS: Definetly one of the best and helpful software for making experiments. Thank you for this.

    Thanks, and you're welcome!

    Cheers,
    Sebastiaan

  • edited June 2013

    Hi again,

    Thanks for answer.
    I created that inline script, copy/pasted there what you recommend in that another topic, and font color changed to yellow. But, background color stay the same...
    Tried also without changing foreground, but same, background stay the same...
    (used back-end is psycho).

    Mmmm... where is my mistake? :)

    Later:

    I found that I can present stimuli as text_display, and in general script editor I can change background/foreground, and it's applied to experiment, but how about forms?

    I also found that in general script editor that in forms I have
    "set cols "1;1;1"
    set form_title "Title"
    set background "blue"
    set ok_text "Ok""

    but despite the fact that I change background to blue, it is further black...

    strange...

  • edited 2:17PM

    Indeed, with the psycho back-end, forms ignore the background variable (issue #183). Basically, the background stays the way it was before. The workaround would be to change the background color (the actual color on the screen, not the background variable) in the run phase of an inline_script item just before the form. Like so:

    win.setColor('red') # Set window color
    win.flip() # Update window
    

    The only thing that this script will do is turn the window into a uniform red, which will automatically be the background color for the form that follows. Note that this is a psycho-specific hack!

    Cheers,
    Sebastiaan

Sign In or Register to comment.