Skip to content

Instantly share code, notes, and snippets.

@BMU-Verlag
Created January 23, 2020 13:45
Show Gist options
  • Save BMU-Verlag/c40714b2c691408b53905fd0c0133ae0 to your computer and use it in GitHub Desktop.
Save BMU-Verlag/c40714b2c691408b53905fd0c0133ae0 to your computer and use it in GitHub Desktop.
window = Tk(className='Chat program')
name_label = Label(window, text='Name')
name_label.grid(row=0, column=0)
name_input = Entry(window, width=100)
name_input.grid(row=0, column=1)
name_confirm_button = Button(window, width=20, text='Confirm', bg='white')
name_confirm_button.grid(row=0, column=2)
chat_log = Text(window, width=100, height=20, state=DISABLED)
chat_log.grid(row=1, column=0, columnspan=3)
message_label = Label(window, text='Message')
message_label.grid(row=2, column=0)
message_input = Entry(window, width=100, state=DISABLED)
message_input.grid(row=2, column=1)
send_button = Button(window, width=20, text='Send', bg='white', command=send, state=DISABLED)
send_button.grid(row=2, column=2)
receive_thread = Thread(target=loop_receive)
receive_thread.start()
window.mainloop()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment