Reputation: 1713
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")
Upvotes: 8
Views: 14598