BioSANS2020.gui_functs.scrollable_text

This is the scrollable_text module

This module controls how text area are placed inside the canvas for displaying output of computation, equations, etc.

The following is the list of function for this module:

  1. save_file

  2. tab

  3. delete_this

  4. prepare_scroll_text

Module Contents

Functions

save_file(_, text)

Opens a file dialog box for saving the constents of the text area

tab(_, text)

insers tab or four spaces in the text area

canvas_update_widgets(_, canvas)

This function update the canvas upon adding new objects by moving

delete_this(frame, canvas)

This function removes objects from the canvas and reorder objects

prepare_scroll_text(items)

This function prepares the scrollable text area by creating a

BioSANS2020.gui_functs.scrollable_text.save_file(_, text)

Opens a file dialog box for saving the constents of the text area

BioSANS2020.gui_functs.scrollable_text.tab(_, text)

insers tab or four spaces in the text area

BioSANS2020.gui_functs.scrollable_text.canvas_update_widgets(_, canvas)

This function update the canvas upon adding new objects by moving objects to ensure they fit nicely. The arrangement is that the last object added appear first (latest goes on top). Args:

canvas : the canvas object

BioSANS2020.gui_functs.scrollable_text.delete_this(frame, canvas)

This function removes objects from the canvas and reorder objects

BioSANS2020.gui_functs.scrollable_text.prepare_scroll_text(items)

This function prepares the scrollable text area by creating a frame as a child of the canvas or items[0]. Scroll capabilities are added and a Text area is created as a child of the frame. Args:

items : 3 item list of [canvas, scroll_x, scroll_y]

Returns:

text : the text area object where text can be inserted