User Interface (UI) tools

Create project UI

class simba.ui.create_project_ui.ProjectCreatorPopUp[source]

Bases: object

Mixin for GUI pop-up windows that accept user-inputs for creating a SimBA project.

Project Creator Pop Up
Example

>>> ProjectCreatorPopUp()
extract_frames()[source]
run()[source]
update_body_part_dropdown(selected_value)[source]
update_img(selected_value)[source]

Set machine learning hyperparameters UI

class simba.ui.machine_model_settings_ui.MachineModelSettingsPopUp(config_path)[source]

Bases: simba.mixins.pop_up_mixin.PopUpMixin, simba.mixins.config_reader.ConfigReader

GUI window for specifying ML model training parameters.

check_meta_data_integrity()[source]
clear_cache()[source]
dropdown_switch_entry_box_state(box, dropdown)[source]
find_meta_file_cnt()[source]
get_expected_meta_dict_entry_keys()[source]
load_config()[source]
save_config()[source]
save_global()[source]

SimBA ML settings frame

class simba.ui.ml_settings_frm.GetMLSettingsFrame(parent, lbl_width=35, bx_width=35)[source]

Bases: object

Creates ML name definition LabelFrame panel in ProjectCreatorPopUp interface.

Get MLSettings Frame
add_entry_box()[source]
fill_frm()[source]
get_existing_values()[source]
remove_entry_box()[source]

SimBA tkinter methods

simba.ui.tkinter_functions.CreateLabelFrameWithIcon(parent, header, icon_name, padx=None, pady=None, relief='solid', width=None, bg=None, font=('DejaVu Sans', 10, 'bold'), icon_link=<class 'tkinter.LabelFrame'>, tooltip_key=None)[source]
simba.ui.tkinter_functions.CreateToolTip(widget, text)[source]
class simba.ui.tkinter_functions.DropDownMenu(parent=None, dropdownLabel='', choice_dict=None, labelwidth='', com=None, val=None, **kw)[source]

Bases: tkinter.Frame

Legacy, use simba.ui.tkinter_functions.SimBADropDown().

disable()[source]
enable()[source]
getChoices()[source]
setChoices(choice)[source]
class simba.ui.tkinter_functions.Entry_Box(parent, fileDescription='', labelwidth=None, label_bg_clr=None, status='normal', validation=None, trace=None, entry_box_width=None, entry_box_clr='white', img=None, value=None, bg_clr=None, label_font=('DejaVu Sans', 8), entry_font=('DejaVu Sans', 8), tooltip_key=None, justify='left', cmd=None, allow_blank=False, **kw)[source]

Bases: tkinter.Frame

bind_combobox_keys()[source]
destroy()[source]

Destroy this and all descendants widgets.

property entry_get
entry_set(val)[source]
run_cmd(x)[source]
set_bg_clr(clr)[source]
set_state(setstatus)[source]
class simba.ui.tkinter_functions.FileSelect(parent=None, fileDescription='', color=None, title=None, lblwidth=None, file_types=None, bg_clr='white', dropdown=None, entry_width=20, status=None, lbl_icon=None, font=('DejaVu Sans', 8), initialdir=None, initial_path=None, tooltip_txt=None, tooltip_key=None, **kw)[source]

Bases: tkinter.Frame

property file_path
setFilePath()[source]
set_state(setstatus)[source]
class simba.ui.tkinter_functions.FolderSelect(parent, folderDescription='', color=None, label_bg_clr=None, font=('DejaVu Sans', 8), title='', lblwidth=0, bg_clr='white', entry_width=20, lbl_icon=None, initialdir=None, tooltip_txt=None, tooltip_key=None, **kw)[source]

Bases: tkinter.Frame

property folder_path
setFolderPath()[source]
set_folder_path(folder_path)[source]
class simba.ui.tkinter_functions.SimBADropDown(parent, dropdown_options, label=None, label_width=None, label_font=('DejaVu Sans', 8), label_bg_clr=None, dropdown_font_size=None, justify='center', img=None, dropdown_width=None, command=None, value=None, state=None, searchable=False, tooltip_txt=None, tooltip_key=None)[source]

Bases: tkinter.Frame

Create a dropdown menu widget with optional searchable functionality.

This class creates a ttk.Combobox dropdown menu with a label, supporting both readonly and searchable modes. When searchable mode is enabled, users can type to filter the dropdown options.

Parameters
  • Tk) (parent (Frame | Canvas | LabelFrame | Toplevel |) – The parent widget container.

  • Tuple[Any]) (dropdown_options (Iterable[Any] | List[Any] |) – List of options to display in the dropdown menu.

  • optional) (tooltip_key (str,) – Text label displayed next to the dropdown. Default: None.

  • optional) – Width of the label in characters. Default: None.

  • optional) – Font tuple for the label. Default: Formats.FONT_REGULAR.value.

  • optional) – Background color for the label. Default: None.

  • optional) – Font size for the dropdown text. Default: None.

  • (str) (justify) – Text justification in the dropdown (β€˜left’, β€˜center’, β€˜right’). Default: β€˜center’.

  • optional) – Width of the dropdown widget in characters. Default: None.

  • optional) – Callback function to execute when an option is selected. Default: None.

  • optional) – Initial selected value for the dropdown. Default: None.

  • optional) – Initial state of the dropdown (β€˜normal’, β€˜disabled’). Default: None.

  • (bool) (searchable) – If True, allows typing to filter dropdown options. Default: False.

  • optional) – Tooltip text to display on hover. Default: None.

  • optional) – Key for tooltip lookup in TOOLTIPS dictionary. For dictionary, see simba.assets.lookups.tooptips.json. Default: None.

Example

>>> dropdown = SimBADropDown(parent=parent_frm, dropdown_options=['Option 1', 'Option 2', 'Option 3'], label='Select option:', searchable=True)
>>> selected = dropdown.get_value()
bind_combobox_keys()[source]
change_options(values, set_index=None, set_str=None, auto_change_width=True)[source]
disable()[source]
enable()[source]
getChoices()[source]
get_value()[source]
on_select(event)[source]
setChoices(choice)[source]
set_value(value)[source]
set_width(width)[source]
simba.ui.tkinter_functions.SimBALabel(parent, txt, txt_clr='black', bg_clr=None, hover_fg_clr=None, font=('DejaVu Sans', 8), hover_font=None, relief='flat', compound='left', justify=None, link=None, width=None, padx=None, pady=None, cursor=None, img=None, anchor=None, tooltip_key=None, hover_img=None)[source]
simba.ui.tkinter_functions.SimBARadioButton(parent, txt, variable, txt_clr='black', font=('DejaVu Sans', 8), compound='left', img=None, enabled=True, tooltip_txt=None, value=False, cmd=None, cmd_kwargs=None)[source]
class simba.ui.tkinter_functions.SimBAScaleBar(parent, label=None, label_width=None, orient='horizontal', length=200, value=95, showvalue=True, label_clr='black', lbl_font=('DejaVu Sans', 8), scale_font=('DejaVu Sans', 8, 'italic'), lbl_img=None, from_=- 1, resolution=1, to=100, tickinterval=None, troughcolor=None, activebackground=None, sliderrelief='flat')[source]

Bases: tkinter.Frame

get()[source]
get_value()[source]
set_value(value)[source]
class simba.ui.tkinter_functions.SimBASeperator(parent, color='black', orient='horizontal', cursor=None, borderwidth=None, takefocus=0, height=1, relief='flat')[source]

Bases: tkinter.Frame

simba.ui.tkinter_functions.SimbaButton(parent, txt, txt_clr='black', bg_clr='#f0f0f0', active_bg_clr=None, hover_bg_clr='#d1e0e0', hover_font=('DejaVu Sans', 8, 'bold'), font=('DejaVu Sans', 8), width=None, height=None, compound='left', img=None, cmd=None, cmd_kwargs=None, enabled=True, anchor='w', thread=False, tooltip_txt=None, tooltip_key=None)[source]
simba.ui.tkinter_functions.SimbaCheckbox(parent, txt, txt_clr='black', bg_clr=None, txt_img=None, txt_img_location='right', font=('DejaVu Sans', 8), val=False, state='normal', indicatoron=True, cmd=None, tooltip_txt=None, tooltip_key=None)[source]
class simba.ui.tkinter_functions.ToolTip(widget)[source]

Bases: object

hidetip()[source]
showtip(text)[source]

Display text in tooltip window

class simba.ui.tkinter_functions.TwoOptionQuestionPopUp(question, option_one, option_two, title, link=None)[source]

Bases: object

Helpe to create a two-option question tkinter pop up window (e.g., YES/NO).

Parameters
  • question (str) – Question to present to the user. E.g., DO YOU WANT TO PROCEED?.

  • option_one (str) – The first user option. E.g., YES.

  • option_one – The second user option. E.g., NO.

  • title (str) – The window titel in the top banner of the pop-up. E.g., A QUESTION FOR YOU!.

  • link (Optional[str]) – If not None, then a link to documentation presenting background info about the user choices.

run(selected_option)[source]
simba.ui.tkinter_functions.bindToMousewheel(event, canvas)[source]
simba.ui.tkinter_functions.callback(url)[source]
simba.ui.tkinter_functions.create_scalebar(parent, name, min, max, cmd=None)[source]
simba.ui.tkinter_functions.form_validator_is_numeric(inStr, acttyp)[source]
simba.ui.tkinter_functions.get_menu_icons()[source]
simba.ui.tkinter_functions.hxtScrollbar(master)[source]
simba.ui.tkinter_functions.onFrameConfigure(canvas)[source]

Reset the scroll region to encompass the inner frame

simba.ui.tkinter_functions.onMousewheel(event, canvas)[source]
simba.ui.tkinter_functions.on_mouse_scroll(event, canvas)[source]
simba.ui.tkinter_functions.unbindToMousewheel(event, canvas)[source]

SimBA create user-defined pose config UI

class simba.ui.user_defined_pose_creator.PoseConfigCreator(pose_name, animal_cnt, img_path, bp_list, animal_id_int_list, circle_scale=None)[source]

Bases: simba.mixins.plotting_mixin.PlottingMixin

Class for creating user-defined pose-estimation pipeline in SimBA through a GUI interface.

Parameters
  • pose_name (str) – Name of the user-defined pose-estimation setting.

  • no_animals (str) – Number of animals in the user-defined pose-estimation setting.

  • img_path (str) – Path to image representation of user-defined pose-estimation setting

  • bp_list (List[str]) – Body-parts in the user-defined pose-estimation setting.

  • animal_id_int_list (List[int]) – Integers representing the animal ID which the body-parts belong to.

Examples

>>> pose_config_creator = PoseConfigCreator(pose_name="My_test_config", no_animals=2, img_path='simba/splash_050122.png', bp_list=['Ear', 'Nose', 'Left_ear', 'Ear', 'Nose', 'Left_ear'], animal_id_int_list= [1, 1, 1, 2, 2, 2])
>>> pose_config_creator.launch()
launch()[source]
save()[source]

SimBA set video info UI

class simba.ui.video_info_ui.VideoInfoTable(config_path, video_dir=None, video_info_path=None)[source]

Bases: simba.mixins.config_reader.ConfigReader, simba.mixins.pop_up_mixin.PopUpMixin

Create GUI that allows users to modify resolutions, fps, and pixels-per-mm interactively of videos within the SimBA project. Data is stored within the project_folder/logs/video_info.csv file in the SimBA project.

Parameters
  • config_path (Union[str, os.PathLike]) – path to SimBA project config file in Configparser format

  • video_dir (Union[str, os.PathLike]) – Optional path to directory with video files. If None, then read from the SimBA project as dictated by project config. Default None.

  • video_info_path (Optional[Union[str, os.PathLike]]) – Optional path to vide_info.csv file. If None, then read from the SimBA project as dictated by project config. Default None.

See also

Tutorial.

Example

>>> ui = VideoInfoTable(config_path=r"C:    roubleshooting\mitra\project_folder\project_config.ini")
>>> ui.run()
run()[source]

SimBA video timelapse

class simba.ui.video_timelaps.TimelapseSlider(video_path, frame_cnt=25, crop_ratio=50, padding=60, ruler_divisions=6, show_ruler=True, ruler_height=None, ruler_width=None, img_width=None, img_height=None, use_timestamps=True)[source]

Bases: object

Interactive timelapse viewer with segment selection sliders.

Creates a Tkinter GUI window displaying a timelapse composite image generated from evenly-spaced frames across a video. Includes interactive sliders to select start and end times for video segments, with visual highlighting of the selected segment and frame previews.

Timelapse Slider
Parameters
  • video_path (Union[str, os.PathLike]) – Path to video file to create timelapse from.

  • frame_cnt (int) – Number of frames to include in timelapse composite. Default 25.

  • ruler_width (Optional[int]) – Width per frame in pixels. If None, calculated to match video width. Default None.

  • crop_ratio (Optional[int]) – Percentage of frame width to keep (0-100). Default 50.

  • padding (int) – Padding in pixels added to timelapse when ruler is shown. Default 60.

  • ruler_divisions (int) – Number of major divisions on time ruler. Default 6.

  • show_ruler (bool) – If True, display time ruler below timelapse. Default True.

  • ruler_height (int) – Height of ruler in pixels. Default 60.

  • use_timestamps (bool) – If True, display timestamps (HH:MM:SS) in labels and ruler. If False, display frame numbers. Default True.

Example

>>> slider = TimelapseSlider(video_path='path/to/video.mp4', frame_cnt=25, crop_ratio=75)
>>> slider.run()
>>> # Use sliders to select segment, then access selected times and frames:
>>> start_time = slider.get_start_time()  # seconds (float)
>>> end_time = slider.get_end_time()  # seconds (float)
>>> start_time_str = slider.get_start_time_str()  # "HH:MM:SS" string
>>> end_time_str = slider.get_end_time_str()  # "HH:MM:SS" string
>>> start_frame = slider.get_start_frame()  # frame number (int)
>>> end_frame = slider.get_end_frame()  # frame number (int)
>>> slider.close()
close()[source]
get_end_frame()[source]
get_end_time()[source]
get_end_time_str()[source]
get_start_frame()[source]
get_start_time()[source]
get_start_time_str()[source]
run()[source]

SimBA import pose frame

class simba.ui.import_pose_frame.ImportPoseFrame(parent_frm=None, config_path=None, idx_row=0, idx_column=0)[source]

Bases: simba.mixins.config_reader.ConfigReader, simba.mixins.pop_up_mixin.PopUpMixin

Import Pose Frame
Parameters
  • parent_frm (Optional[Union[Frame, Canvas, LabelFrame, ttk.Frame]]) – Parent frame to insert the Import pose frame into. If None, one is created.

  • config_path (Optional[Union[str, os.PathLike]]) –

  • idx_row (Optional[int]) – The row in parent_frm to insert the Import pose frame into. Default: 0.

  • idx_column (Optional[int]) – The column in parent_frm to insert the Import pose frame into. Default: 0.

Example

>>> _ = ImportPoseFrame(config_path='/Users/simon/Desktop/envs/simba/troubleshooting/two_black_animals_14bp/project_folder/project_config.ini')
>>> _ = ImportPoseFrame(config_path=r"C:    roubleshooting\simba_blob_project\project_folder\project_config.ini")
create_import_menu(data_type_choice)[source]

SimBA import videos frame

class simba.ui.import_videos_frame.ImportVideosFrame(parent_frm=None, config_path=None, idx_row=0, idx_column=0)[source]

Bases: simba.mixins.pop_up_mixin.PopUpMixin, simba.mixins.config_reader.ConfigReader

Import Videos Frame
Parameters
  • parent_frm (Optional[Union[Frame, Canvas, LabelFrame, ttk.Frame]]) – Parent frame to insert the Import Videos frame into. If None, one is created.

  • config_path (Optional[Union[str, os.PathLike]]) –

  • idx_row (Optional[int]) – The row in parent_frm to insert the Videos frame into. Default: 0.

  • idx_column (Optional[int]) – The column in parent_frm to insert the Videos frame into. Default: 0.

Example

>>> ImportVideosFrame(config_path='/Users/simon/Desktop/envs/simba/troubleshooting/two_black_animals_14bp/project_folder/project_config.ini')

SimBA batch process menus

class simba.video_processors.batch_process_menus.BatchProcessFrame(input_dir, output_dir)[source]

Bases: simba.mixins.pop_up_mixin.PopUpMixin

Interactive GUI that collect user-inputs for batch processing videos (e.g., cropping, clipping etc.). User-selected output is stored in json file format within the user-defined output_dir

Parameters
  • input_dir (str) – Input folder path containing videos for bath processing.

  • output_dir (str) – Output folder path for where to store the processed videos.

Example

>>> batch_preprocessor = BatchProcessFrame(input_dir=r'MyInputVideosDir', output_dir=r'MyOutputVideosDir')
>>> batch_preprocessor.create_main_window()
>>> batch_preprocessor.create_video_table_headings()
>>> batch_preprocessor.create_video_rows()
>>> batch_preprocessor.create_execute_btn()
>>> batch_preprocessor.main_frm.mainloop()
apply_fps_to_all()[source]
apply_quality_to_all()[source]
apply_resolution_to_all()[source]
apply_trim_to_all()[source]
batch_process_crop_function(video_name)[source]
create_execute_btn()[source]
create_main_window()[source]
create_video_rows()[source]
create_video_table_headings()[source]
execute()[source]
get_file_menu()[source]
get_input_files()[source]
inverse_all_cb_ticks(variable_name=None)[source]
perform_unit_tests(out_video_dict)[source]
preferences_pop_up()[source]
reset_crop()[source]

SimBA get pixels per millimeter converstion UI

class simba.ui.px_to_mm_ui.GetPixelsPerMillimeterInterface(video_path, known_metric_mm, line_thickness=None, circle_size=None)[source]

Bases: object

Graphical interface to compute how many pixels represents a metric millimeter.

Parameters
  • video_path (Union[str, os.PathLike]) – Path to a video file on disk.

  • known_metric_mm (float) – Known millimeter distance to get the pixels conversion factor for.

Returns

The number of pixels per metric millimeter.

Return type

float

Example

>>> runner = GetPixelsPerMillimeterInterface(video_path='/Users/simon/Desktop/envs/simba/troubleshooting/two_black_animals_14bp/project_folder/videos/Together_1.avi', known_metric_mm=140)
>>> runner.run()
>>> runner = GetPixelsPerMillimeterInterface(video_path='/Users/simon/Desktop/blank_video.mp4', known_metric_mm=140)
>>> runner.run()
run()[source]

SimBA pop-up UIs

SimBA pop-up mixin

class simba.mixins.pop_up_mixin.PopUpMixin(title, config_path=None, main_scrollbar=True, size=(960, 720), icon=None)[source]

Bases: object

Methods for pop-up windows in SimBA. E.g., common methods for creating pop-up windows with drop-downs, checkboxes, entry-boxes, listboxes etc.

Parameters
  • title (str) – Pop-up window title

  • config_path (Optional[configparser.Configparser]) – path to SimBA project_config.ini. If path, the project config is read in. If None, the project config is not read in.

  • size (tuple) – HxW of the pop-up window. The size of the pop-up window in pixels.

  • main_scrollbar (bool) – If True, the pop-up window is scrollable.

add_to_listbox_from_entrybox(list_box, entry_box)[source]

Add a value that populates a tkinter entry_box to a tkinter listbox.

Parameters
  • list_box (Listbox) – The tkinter Listbox to add the value to.

  • entry_box (Entry_Box) – The tkinter Entry_Box containing the value that should be added to the list_box.

add_value_to_listbox(list_box, value)[source]

Add a float value to a tkinter listbox.

Parameters
  • list_box (Listbox) – The tkinter Listbox to add the value to.

  • value (float) – Value to add to the listbox.

add_values_to_several_listboxes(list_boxes, values)[source]

Add N values to N listboxes. E.g., values[0] will be added to list_boxes[0].

Parameters
  • list_boxes (List[Listbox]) – List of Listboxes that the values should be added to.

  • values (List[float]) – List of floats that will be added to the list_boxes.

children_cnt_main()[source]

Find the number of children (e.g., labelframes) currently exist within a main pop-up window. Useful for finding the row at which a new frame within the window should be inserted.

create_cb_frame(cb_titles, main_frm=None, frm_title='', idx_row=- 1, command=None)[source]

Creates a labelframe with checkboxes and inserts the labelframe into a window.

Create cb frame

Note

One checkbox will be created per cb_titles. The checkboxes will be labeled according to the cb_titles. If checking/un-checking the box should have some effect, pass that function as command which takes the name of the checked/unchecked box.

Parameters
  • main_frm (Optional[Union[Frame, Canvas, LabelFrame, ttk.Frame]]) – The pop-up window to insert the labelframe into.

  • cb_titles (List[str]) – List of strings representing the names of the checkboxes.

  • frm_title (Optional[str]) – Title of the frame.

  • idx_row (Optional[int]) – The location in main_frm to create the LabelFrame. If -1, then at the bottom.

  • command (Optional[Callable[[str], Any]]) – Optional function callable associated with checking/unchecking the checkboxes.

Return Dict[str, BooleanVar]

Dictionary holding the cb_titles as keys and the BooleanVar representing if the checkbox is ticked or not.

Example

>>> PopUpMixin.create_cb_frame(cb_titles=['Attack', 'Sniffing', 'Rearing'], frm_title='My classifiers')
create_choose_number_of_body_parts_frm(project_body_parts, run_function, title='SELECT NUMBER OF BODY-PARTS', dropdown_lbl='# of body-parts')[source]

Many menus depend on how many animals the user choose to compute metrics for. Thus, we need to populate the menus dynamically. This function creates a single drop-down menu where the user select the number of animals the user choose to compute metrics for. It inserts this drop-down iat the bottom of the pop-up window, and ties this dropdown menu choice to a callback.

Parameters
  • project_body_parts (List[str]) – Options of the dropdown menu.

  • run_function (object) – Function tied to the choice in the dropdown menu.

create_clf_checkboxes(main_frm, clfs, title='SELECT CLASSIFIER ANNOTATIONS')[source]

Creates a labelframe with one checkbox per classifier, and inserts the labelframe into the bottom of the pop-up window.

Note

Legacy. Use create_cb_frame instead.

create_dropdown_frame(drop_down_titles, drop_down_options, frm_title='', idx_row=- 1, main_frm=None)[source]

Creates a labelframe with dropdowns.

Create dropdown frame
Parameters
  • main_frm (Optional[Union[Frame, Canvas, LabelFrame, ttk.Frame]]) – The pop-up window to insert the labelframe into. If None, one will be created.

  • drop_down_titles (List[str]) – The titles of the dropdown menus.

  • drop_down_options (List[str]) – The options in each dropdown. Note: All dropdowns must have the same options.

  • frm_title (Optional[str]) – Title of the frame.

Return Dict[str, BooleanVar]

Dictionary holding the drop_down_titles as keys and the drop-down menus as values.

Example

>>> PopUpMixin.create_dropdown_frame(drop_down_titles=['Dropdown 1', 'Dropdown 2', 'Dropdown 2'], drop_down_options=['Option 1', 'Option 2'], frm_title='My dropdown frame')
create_run_frm(run_function, title='RUN', btn_txt_clr='black', idx=None, btn_icon_name='rocket', padx=0, pady=0)[source]

Create a label frame with a single button with a specified callback.

Parameters
  • btn_txt_clr – The color of the text on the execute button.

  • idx – If not none, then the index of the main frame where to insert the RUN labelframe.

  • btn_icon_name – Name of the icon to use for the run button. If None, then no icon.

  • run_function (object) – The function/method callback of the button.

  • title (str) – The title of the frame.

enable_dropdown_from_checkbox(check_box_var, dropdown_menus)[source]

Given a single checkbox, enable a bunch of dropdowns if the checkbox is ticked, and disable the dropdowns if the checkbox is un-ticked.

Parameters
  • check_box_var (BooleanVar) – The checkbox associated tkinter BooleanVar.

  • dropdown_menus (List[DropDownMenu]) – List of dropdowns which status is controlled by the check_box_var.

enable_entrybox_from_checkbox(check_box_var, entry_boxes, reverse=False)[source]

Given a single checkbox, enable or disable a bunch of entry-boxes based on the status of the checkbox.

Parameters
  • check_box_var (BooleanVar) – The checkbox associated tkinter BooleanVar.

  • entry_boxes (List[Entry_Box]) – List of entry-boxes which status is controlled by the check_box_var.

  • reverse (bool) – If False, the entry-boxes are enabled with the checkbox is ticked. Else, the entry-boxes are enabled if checkbox is unticked. Default: False.

frame_children(frame)[source]

Find the number of children (e.g., labelframes) currently exist within specified frame.Similar to children_cnt_main, but accepts a specific frame rather than the main frame beeing hardcoded.

place_frm_at_top_right(frm)[source]

Place a TopLevel tkinter pop-up at the top right of the monitor. Note: call before putting scrollbars or converting to Canvas.

static place_window_at_corner(window, corner, offset_x=0, offset_y=0)[source]

Place the window at a screen corner. Placement is deferred (via after(0, …)) so the window is laid out first; call right after building the window.

Parameters
  • win – A tk.Toplevel or tk.Tk window.

  • corner – One of β€œtop_left”, β€œtop_right”, β€œbottom_left”, β€œbottom_right”.

  • offset_x – Pixels from the corner horizontally (positive = inward).

  • offset_y – Pixels from the corner vertically (positive = inward).

remove_from_listbox(list_box)[source]

Remove the current selection in a listbox from a listbox.

Parameters

list_box (Listbox) – The listbox that the current selection should be removed from.

update_config()[source]

Helper to update the SimBA project config file

update_file_select_box_from_dropdown(filename, fileselectbox)[source]

Updates the text inside a tkinter FileSelect entrybox with a new string.