expyriment.io.TextInput

class expyriment.io.TextInput(message='', position=None, ascii_filter=None, length=None, message_text_size=None, message_colour=None, message_font=None, message_bold=None, message_italic=None, user_text_size=None, user_text_bold=None, user_text_font=None, user_text_colour=None, background_colour=None, frame_colour=None, gap=None, screen=None, background_stimulus=None)

A class implementing a text input box.

Methods

__init__(message='', position=None, ascii_filter=None, length=None, message_text_size=None, message_colour=None, message_font=None, message_bold=None, message_italic=None, user_text_size=None, user_text_bold=None, user_text_font=None, user_text_colour=None, background_colour=None, frame_colour=None, gap=None, screen=None, background_stimulus=None)

Create a text input box.

Parameters :

message : str, optional

message to show

position : (int, int), optional

position of the TextInput canvas

ascii_filter : list, optional

list of ASCII codes to filter for

message_text_size : int, optional

text size of the message

message_colour : (int, int, int), optional

text colour of the message

message_font : str, optional

text font of the message

message_bold : bool, optional

True if message text should be bold

message_italic : bool, optional

True if message text should be italic

user_text_size : int, optional

text size of the user input

user_text_font : str, optional

text font of the user input

user_text_colour : (int, int ,int), optional

text colour of the user input

user_text_bold : bool, optional

True if user text should be bold

background_colour : (int, int, int), optional

frame_colour : (int, int, int)

colour of the frame

gap : int, optional

gap between message and user input

screen : io.Screen, optional

screen to present on

background_stimulus : expyriment stimulus, optional

The background stimulus is a second stimulus that will be presented together with the TextInput. For both stimuli overlap TextInput will appear on top of the background_stimulus

Notes

This stimulus is not optimized for timing accurate presentation!

ascii_code_filter

Getter for filter

background_colour

Getter for background_colour

background_stimulus

Getter for background_stimulus

frame_colour

Getter for frame_colour

gap

Getter for gap

get(default_input='')

Get input from user.

Parameters :

default_input : str, optional

default input in the textbox

Notes

This displays and updates the input box automatically. Pressing ENTER returns the user input. Pressing ESC quits, returning an empty string.

length

Getter for length

logging

Getter for logging.

message

Getter for message

message_bold

Getter for message_bold

message_colour

Getter for message_colour

message_font

Getter for message_font

message_italic

Getter for message_italic

message_text_size

Getter for message_text_size

position

Getter for position

screen

Getter for screen

set_logging(onoff)

Set logging of this object on or off

Parameters :

onoff : bool

set logging on (True) or off (False)

Notes

See also design.experiment.set_log_level fur further information about event logging.

user_text_bold

Getter for user_text_bold

user_text_colour

Getter for user_text_colour

user_text_font

Getter for user_text_font

user_text_size

Getter for user_text_size

Previous topic

expyriment.io.StreamingButtonBox

Next topic

expyriment.io.TextMenu

This Page