Exemplo n.º 1
0
insults_using_frame = Label(root)
insults_using_frame.grid(row=3, column=0)
w = Label(insults_using_frame,
          bg='gold',
          fg='black',
          text='     USING CLEAN INSULTS, ' + str(Glo.tim_lang) + '     ')
w.grid()

listbox_frame = LabelFrame(root)
listbox_frame.grid(padx=8, pady=8)

# Insert logo.
IMAGEx = Image.open('tim-logov3-360x195.jpg')
PHOTOx = ImageTk.PhotoImage(IMAGEx)
LABELx = Label(logo_frame, image=PHOTOx)
LABELx.IMAGEx = PHOTOx
LABELx.grid(padx=2, pady=2, row=0, column=0)


def change_lang(clang):
    """Change accent."""
    Glo.tim_lang = clang
    tim_says('Accent selected')

    # zero all accents in list first.
    for zeroed in range(len(accents)):
        accent = accents[zeroed]
        accent.set(0)

    if Glo.tim_lang == 'en-uk':
        ukVar.set(1)