I want to create a Text widget where a canvas can be inserted to text. I have almost got it perfect however I need the canvas to take up two lines of space. I want the first line 'Tom 24/11/2019' to be aligned with the top of the canvas and the second line 'Hi Jim' to be aligned with the bottom of the canvas. Is what I'm trying to do possible in any way?
import tkinter as tk
sender='Tom'
dt='24/11/2019'
message='Hi Jim!'
root = tk.Tk()
text = tk.Text(root)
text.pack(padx = 10, pady = 10)
text.window_create(tk.END, window = tk.Canvas(root,bg='red',width=50,height=50)) # Example 2
text.tag_configure("sender", font="Arial 12 bold")
text.tag_configure("message", font="Arial 10",lmargin1=55,lmargin2=55)
text.tag_configure("date", font="Arial 8")
text.insert("end", sender.title()+' ',"sender")
text.insert("end", dt+'\n','date')
text.insert("end", message+'\n\n', 'message')
root.mainloop()