title: Tkinter: How to make a rounded corner text widget?
body: <p>Question</p>
  
  <p>How to create a rounded corner text widget? I think I have an idea of creating a rounded canvas and fill the entire canvas with the text box with no border.</p>
  
  <hr>
  
  <p>Problem</p>
  
  <p>The code to create a rounded border canvas is not working when I try to extend the height and width of the canvas. The line breaks and becomes discontinuous.</p>
  
  <hr>
  
  <p>The code to create rounded corner canvas is taken from <a href="https://stackoverflow.com/questions/44099594/how-to-make-a-tkinter-canvas-rectangle-with-rounded-corners?rq=1">How to make a tkinter canvas rectangle with rounded corners?</a></p>
  
  <p>My code with custom width and height</p>
  
  <pre><code>def rounded_rect(canvas, x, y, w, h, c):
      canvas.create_arc(x,   y,   x+2*c,   y+2*c,   start= 90, extent=90, style="arc")
      canvas.create_arc(x+w-2*c, y+h-2*c, x+w, y+h, start=270, extent=90, style="arc")
      canvas.create_arc(x+w-2*c, y,   x+w, y+2*c,   start=  0, extent=90, style="arc")
      canvas.create_arc(x,   y+h-2*c, x+2*c,   y+h, start=180, extent=90, style="arc")
      canvas.create_line(x+c, y,   x+w-c, y    )
      canvas.create_line(x+c, y+h, x+w-c, y+h  )
      canvas.create_line(x,   y+c, x,     y+h-c)
      canvas.create_line(x+w, y+c, x+w,   y+h-c)
  
  import tkinter
  root = tkinter.Tk()
  canvas = tkinter.Canvas(root)
  canvas.grid(row=0,column=0)
  
  # The width and height has been changed from the original solution
  rounded_rect(canvas, 10, 10, 330, 290, 10)
  root.mainloop()
  </code></pre>
  
  <p>Output</p>
  
  <p><a href="https://i.stack.imgur.com/l9TRU.png" rel="noreferrer"><img src="https://i.stack.imgur.com/l9TRU.png" alt="enter image description here"></a></p>