예제 #1
0
def console(text: tk.Text):
    """ Refreshes the logging console """

    messages = rtm.get_logging_data()

    text.insert(tk.END, messages)

    if running:
        text.see(tk.END)

    text.after(INTERVAL, console, text)
예제 #2
0
def handle_shift_send(input_box: tk.Text):
    """
    Used when sending a message using shift return. Waits 100ms
    before sending the message so that the return key is entered with
    the message rather than after it is sent. If it is done after then
    the cursor will be on line 2 when the user wants to type again.

    Paramters:
        input_box (tk.Text): Message box
    """
    input_box.after(100, handle_send, input_box)