expyriment.io.TextMenu

class expyriment.io.TextMenu(heading, menu_items, width, position=None, text_size=None, gap=None, background_colour=None, text_colour=None, heading_text_colour=None, select_background_colour=None, select_text_colour=None, select_frame_colour=None, select_frame_line_width=None, justification=None, scroll_menu=None, background_stimulus=None)

A class implementing a text menu.

Methods

__init__(heading, menu_items, width, position=None, text_size=None, gap=None, background_colour=None, text_colour=None, heading_text_colour=None, select_background_colour=None, select_text_colour=None, select_frame_colour=None, select_frame_line_width=None, justification=None, scroll_menu=None, background_stimulus=None)

Create a text menu.

This creates a menu with items to be selected.

Parameters :

heading : str

menu heading

menu_items : str or list

list with menu items

width : int

width of the menu

position : (int, int), optional

text_size : int, optional

background_colour : (int, int, int), optional

background colour of the menu

gap : int, optional

size of gap (pixel) between heading and item list

text_colour : (int, int, int), optional

text colour of the items

heading_text_colour : (int, int, int), optional

text colour of the heading

select_background_colour : (int, int, int), optional

background colour of the currently selected item

select_text_colour : (int, int, int), optional

text colour of the currently selected item

select_frame_colour : (int, int, int), optional

colour of the frame around the selected item

select_frame_line_width : int, optional

line width of the frame around the selected item

justification : int, optional

text justification: 0 (left), 1 (center), 2 (right)

scroll_menu : int, optional

maximum length of a item list before a scroll menu will be display. If the parameter is 0 of False scroll menu will not be displayed

background_stimulus : expyriment stimulus, optional

stimulus on which the menu will be plotted

background_colour

Getter for background_colour

background_stimulus

Getter for background_stimulus

gap

Getter for gap

get(preselected_item=0)

Present the menu and return the selected item.

Parameters :

preselected_item : int, optional

item that is preselected when showing menu

Returns :

selected : int

integer representing the selected item in the list

heading

Getter for heading

heading_text_colour

Getter for heading_text_colour

justification

Getter for justification

menu_items

Getter for menu_items

position

Getter for position

scroll_menu

Getter for scroll_menu

select_background_colour

Getter for select_background_colour

select_frame_colour

Getter for select_frame_colour

select_frame_line_width

Getter for select_frame_line_width

select_text_colour

Getter for select_text_colour

text_colour

Getter for text_colour

text_size

Getter for text_size

Previous topic

expyriment.io.TextInput

Next topic

expyriment.io.TriggerInput

This Page