Self.buttonSend = tk.Button(frameTrans, text = "Send", command = self.processButtonSend) Self.InputText = tk.Text(frameTransSon, wrap = tk.WORD, width = 60, height = 5, yscrollcommand = t) ScrollbarTrans.pack(side = tk.RIGHT, fill = tk.Y) ScrollbarTrans = tk.Scrollbar(frameTransSon) id(row = 1, column = 1, padx = 3, pady = 2, sticky = tk.W) LabelInText = tk.Label(frameTrans,text="To Transmit Data:") Self.OutputText = tk.Text(frameRecvSon, wrap = tk.WORD, width = 60, height = 20, yscrollcommand = t) ScrollbarRecv.pack(side = tk.RIGHT, fill = tk.Y) ScrollbarRecv = tk.Scrollbar(frameRecvSon) LabelOutText = tk.Label(frameRecv,text="Received Data:") Self.ReadUARTThread = threading.Thread(target=self.ReadUART) (row = 3, column = 4, padx = 5, pady = 3, sticky = tk.E) Self.button = Button(frame_COMinf, text="Start", command=self.button_clicked) Port_id(row = 2, column = 2, padx = 5, pady = 3) Port_combobox = ttk.Combobox(frame_COMinf,textvariable=lected_port) lected_port = tk.StringVar(value = "Select COM.") id(row = 2, column = 3, padx = 5, pady = 3)īaudrate_id(row = 2, column = 4, padx = 5, pady = 3) LabelBaudrate = tk.Label(frame_COMinf,text="Baudrate: ") id(row = 2, column = 1, padx = 5, pady = 3) LabelCOM = tk.Label(frame_COMinf,text="COMx: ") #notebook.add(frame_Memory, text="Memory") #frame_Memory = tk.Frame(window, bg='#09c')įrame_COMinf= tk.Frame(window,relief='groove',bg='#7AFEC6') # a frame contains COM's information, and start/stop button Self.uartState = False # is uart open or not Window.resizable(width=False, height=False) I want to use notebook of tkinter to creat tab, but i don't know why my notebook always cover other component(label、button、combbox),i find some articles say the pack() and grid () can't use together,so i just used grid() to draw component,but it still cover other component import threading
0 Comments
Leave a Reply. |