Collectives™ on Stack Overflow
Find centralized, trusted content and collaborate around the technologies you use most.
Learn more about Collectives
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Learn more about Teams
I am trying to create a simple textbox using tkinter. Below is the code I am trying to use.
import tkinter as tk
from tkinter import simpledialog
root = tk.Tk() # Create an instance of tkinter
start_date = simpledialog.askstring(title = "Test Title",
prompt = "Entire Start Date in MM/DD/YYYY format:")
Below is the output I am getting as expected.
My question is, how do I populate a default value in the empty slot by default, as shown below?
In R, I can easily do this using the below command.
start_date <- winDialogString("Entire Start Date in MM/DD/YYYY format:", "01/31/2018")
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.