title: How do I disable keyboard input into an Entry widget, disable resizing of tkinter window and hide the console window?
body: <p>I am making a calculator using tkinter and I wish to do the following:</p>
  
  <blockquote>
    <ul>
    <li>Disable keyboard input for the <code>Entry</code> widget so that the user can only input through the buttons.  </li>
    <li>Even after disabling keyboard input for the <code>Entry</code> widget, I wish to be able to change the background and foreground of the widget.  </li>
    <li>I wish to hide the console window because it is totally useless in the use of this calculator.  </li>
    <li>I don't want to let the user resize the <code>root</code> window. How do I disallow the resizing of the <code>root</code> window?</li>
    </ul>
  </blockquote>
  
  <p>Here is my code so far...</p>
  
  <pre><code>from tkinter import *
  
  root = Tk()
  root.title("Calculator")
  root.config(background="black")
  operator = ""
  textVar = StringVar()
  def valInput(number):
      global operator
      operator+=str(number)
      textVar.set(operator)
  
  display = Entry(root, textvariable=textVar, font=("Arial", 14, "bold"), bg="lightblue", fg="black", justify="right")
  display.grid(row=0, column=0, columnspan=4)
  btn7 = Button(root, font=("Arial", 12, "bold"), bg="orange", fg="red", text="7", command= lambda : valInput(7))
  btn7.grid(row=1, column=0)
  
  """
  And more buttons...
  
  """
  root.mainloop()
  </code></pre>
  
  <p>As you can see, I can input into the <code>Entry</code> widget using buttons but later on, after the calculator is complete, if the user inputs characters like abcd... it will cause problems and show errors. How do I disallow keyboard entry so that I can avoid these errors?  </p>
  
  <p>I want to make my calculator a bit colorful. I changed the color of the <code>root</code> window, the buttons and also the color of the <code>Entry</code> widget. Is there any way to change the color of the widget even after it is disabled?  </p>
  
  <p>I don't need the console window while using this calculator. How do I hide it?  </p>
  
  <p>If I resize the <code>root</code> window, the calculator becomes ugly, besides, resizing the window isn't necessary. So how do I prevent the user from resizing the window?</p>