def create_frm_right(self): ''' 上半部分右边窗口: 分为4个部分: 1、Label显示和重置按钮和发送按钮 2、Text显示(发送的数据) 3、Label显示和十进制选择显示和清除接收信息按钮 4、Text显示接收到的信息 ''' self.frm_right_reset = pytk.PyLabelFrame(self.frm_right) self.frm_right_send = pytk.PyText(self.frm_right, font=g_font, width=60, height=5) self.frm_right_clear = pytk.PyLabelFrame(self.frm_right) self.frm_right_receive = pytk.PyText(self.frm_right, font=g_font, width=60, height=8) self.frm_right_reset.pack(fill="both", expand=0, padx=1) self.frm_right_send.pack(fill="both", expand=1, padx=1) self.frm_right_clear.pack(fill="both", expand=0, padx=1) self.frm_right_receive.pack(fill="both", expand=1, padx=1) self.frm_right_receive.tag_config("green", foreground="#228B22") self.create_frm_right_reset() self.create_frm_right_clear()
def create_frm_right(self): ''' 上半部分右边窗口: 分为4个部分: 1、Label显示和重置按钮和发送按钮 2、Text显示(发送的数据) 3、Label显示和十六进制选择显示和清除接收信息按钮 4、Text显示接收到的信息 ''' self.frm_right_reset = pytk.PyLabelFrame(self.frm_right) self.frm_right_send = pytk.PyText(self.frm_right, width=50, height=size_dict["send_text_height"], font=("Monaco", 9)) self.frm_right_clear = pytk.PyLabelFrame(self.frm_right) self.frm_right_receive = pytk.PyText( self.frm_right, width=50, height=size_dict["receive_text_height"], font=("Monaco", 9)) self.frm_right_reset.grid(row=0, column=0, padx=1, sticky="wesn") self.frm_right_send.grid(row=1, column=0, padx=1, sticky="wesn") self.frm_right_clear.grid(row=2, column=0, padx=1, sticky="wesn") self.frm_right_receive.grid(row=3, column=0, padx=1, sticky="wesn") self.frm_right_receive.tag_config("green", foreground="#228B22") self.create_frm_right_reset() self.create_frm_right_clear()