def _fillRightBottom(self, bottom): self.text = TaggedText(bottom, width=40, height=15, bg='white', takefocus=0) self.text.grid(row=0, column=0, sticky='news')
def createMessageBody(bodyFrame, message, image, frameBg='white', textBg='white', textPad=5): """ Create a Text containing the message. Params: bodyFrame: tk.Frame to be filled. msg: a str or list with the lines. """ bodyFrame.config(bg=frameBg, bd=0) text = TaggedText(bodyFrame, bg=textBg, bd=0, highlightthickness=0) # Insert image if image: label = tk.Label(bodyFrame, image=image, bg=textBg, bd=0) label.grid(row=0, column=0, sticky='nw') text.frame.grid(row=0, column=1, sticky='news', padx=textPad, pady=textPad) fillMessageText(text, message) bodyFrame.rowconfigure(0, weight=1) bodyFrame.columnconfigure(1, weight=1) return text