채팅 화면이 나오는 창을 만드는 소스 - 각 팀마다 만들기
자겸, 휘동 ¶
~cpp
from Tkinter import *
class Main:
def __init__(self, master):
self.frame = Frame(master)
#for show texts
self.showscrollbar = Scrollbar(master)
self.showscrollbar.place(x = 550, y = 0, width = 50, height = 550)
self.show = Listbox(master, yscrollcommand = self.showscrollbar.set)
self.show.place(x = 0, y = 0, width = 585, height = 550)
for i in range(400):#test scrollbar
self.show.insert(END, str(i))
self.showscrollbar.config(command = self.show.yview)
#for input a string(?)
self.edit = Entry(master)
self.edit.place(x = 0, y = 550 , width = 600 , height = 50)
#for user list
self.listscrollbar = Scrollbar(master)
self.listscrollbar.place(x = 800-50, y = 0, width = 50, height = 600)
self.list = Listbox(master, yscrollcommand = self.listscrollbar.set)
self.list.place(x = 600, y = 0, width = 185, height = 600)
for i in range(400):#test scrollbar
self.list.insert(END, str(i))
self.listscrollbar.config(command = self.list.yview)
if __name__ == "__main__":
root = Tk()
root.configure( width = 800, height = 600)
win = Main(root)
root.mainloop()