U E D R , A S I H C RSS

2학기파이선스터디/채팅창

채팅 화면이 나오는 창을 만드는 소스 - 각 팀마다 만들기

자겸, 휘동


~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() 
Valid XHTML 1.0! Valid CSS! powered by MoniWiki
last modified 2021-02-07 05:22:13
Processing time 0.0110 sec