title: How do I center text in a single line output Text widget in Tkinter?
body: <p>I'm creating a translation app with python dictionary; I have and entry widget (for inputting keys) and a single line Text widget (for outputting the values. I want the text outputted in the Text widget to be aligned center. I have tried tag_configure method but it's still not centering; the outputted text is still aligned left. What do I do? Thanks. Below is the code:</p>
  <p>That is, the text widget is initially empty until a button is clicked for text in the entry widget (ent) to be translated into the text widget (output). The problem is, the text that appears in the output widget is aligned left; I want to align it center.</p>
  <pre><code>#Entry field
  ent=Entry(root,width=28,justify='center',font=('Times 18'),textvar=textin,bg='white')
  ent.pack()
  
  #Output field
  output = tk.Text(root)
  output=Text(root,width=28,height=1,font=('Times 18'),fg=&quot;black&quot;)
  output.tag_configure(&quot;center&quot;,justify='center')
  output.tag_add(&quot;center&quot;,1.0,&quot;end&quot;)
  output.pack()
  </code></pre>