Open PySimpleGUI opened 3 years ago
Oh, also.... if you do a lot of stuff with Excel and OpenPyXL, you may be interested in the new OpenPyXL book that Mike Driscoll is writing. It's on Kickstarter at the moment. I saw your OpenPyXL code/use obviously.
https://www.kickstarter.com/projects/driscollis/automating-excel-with-python
Wow, thanks a lot for the review and comments. It really encourages.
Sorry for late reply, I did not expect anyone to comment 😄 and I figured out now that my email in the readme file is incorrect...
I will check the book, for sure, as I work with Excel files a lot. Thank you!
Better late than never!
Here's a tip for you to try.....
This technique is something I used to do too to draw lines
[sg.Text('='*65)],
Last year I added the HorizontalSeperator
element. It'll draw a line all the way across and will change with the size of the window so you don't have to indicate how long it should be.
Here's an example of the difference.....
Using the Horizontal Separator
This is all I did with your layout.... changed 2 lines:
layout = [
[sg.Text('Schedule Generator', font=("Helvetica", 20))],
# [sg.Text('='*65)],
[sg.HorizontalSeparator()],
[sg.Text('Choose Employee Excel File')],
[sg.In(key='-MANAGER_FILE-'), sg.FileBrowse(file_types=(("Excel Files", "*.xlsx"),))],
[sg.Text('Choose Teams File')],
[sg.In(key='-TEAMS_FILE-'), sg.FileBrowse(file_types=(("Excel Files", "*.xlsx"),))],
[sg.HorizontalSeparator()],
# [sg.Text('-'*50)],
[sg.Text('Choose Year', size=(15, 1), font=('Courier', 14)), sg.Input(key='-YEAR-', size=(4, 1))],
[sg.Text('Choose Month', size=(15, 1), font=('Courier', 14)), sg.Input(key='-MONTH-', size=(4, 1))],
[sg.Button('Calculate', key="-CALCULATE-"), sg.Exit()]
]
Keep building stuff. Love to see projects like this posted! And I'm sure others do too (you've got 8 stars on this project so I'm not the only one)
Thanks for the suggestion. I guess, I missed the part of separators in the docs.
I have updated the code as per your suggestion and it really looks better, now.
Thank you for the encouragement, I really appreciate it!!!
There is so much to like about this project and how you created it.
Your readme is top-notch. You've got a screenshot of your GUI right at the top. Code that's formatted. You follow the PySimpleGUI coding conventions. Wow! 💪 🧙♂️
Way to go! Professional looking all the way.