Example #1
0
def check_elements_exist(window: Window, field_data: map) -> list:
    """ This method check if the elements exists in a window and returns a list that contains the exists elements.

    Args:
        window: a window that need to check.
        field_data: a map contains all fields in the window and matched header in the data map.

    Returns: a list that contains the exists elements.

    """
    elements = []
    for element in window.element_list():
        if element.Key in field_data.keys():
            elements.append(element.Key)
    return elements
Example #2
0
def reset_error_borders(window: sg.Window):
    for ele in window.element_list():
        if ele.Type == 'input':
            ele.Widget.configure(highlightthickness=0)