Created
July 18, 2019 16:58
-
-
Save fnneves/06bf5ff5b240e1f539fae8d04e443f55 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# creating the entries for the user input, FROM, TO and dates | |
from_city_entry = tk.Entry(frame_main_1, textvariable = from_city1, width=4) | |
from_city_entry.bind("<KeyRelease>", caps_from) # everytime a key is released, it runs the caps_from function on the cell | |
to_city_entry = tk.Entry(frame_main_2, textvariable = to_city1, width=4) | |
to_city_entry.bind("<KeyRelease>", caps_to) # everytime a key is released, it runs the caps_to function on the cell | |
departure_date_entry = tk.Entry(frame_main_1, textvariable = departure_date1, width=12) | |
return_date_entry = tk.Entry(frame_main_2, textvariable = return_date1, width=12) | |
# and we pack the two frames in the center_frame and then the elements inside them | |
frame_main_1.pack(fill='x', pady=2) | |
frame_main_2.pack(fill='x',pady=2) | |
# | |
# the order which we pack the items is important | |
from_city.pack(side='left') | |
from_city_entry.pack(side='left', padx=1) | |
departure_date.pack(side='left', padx=5) | |
departure_date_entry.pack(side='left') | |
to_city.pack(side='left') | |
to_city_entry.pack(side='left', padx=1) | |
return_date_entry.pack(side='right') | |
return_date.pack(side='right', padx=5) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment