Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

changed credits link #26

Merged
merged 1 commit into from
Nov 8, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 14 additions & 4 deletions getdata.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
# set default fonts
font12 = ('Helvetica', 12)
font14 = ('Helvetica', 14)

font_ul = ("Helvetica", 16, "underline")

# VALIDATION
def is_email(window, input):
Expand Down Expand Up @@ -339,13 +339,23 @@ def main():
else:
window['OUT'].print('[ERROR- GENERAL] All fields are required except for Email Alert', text_color='red', font=font14)

# if link has been clicked open URL
if event in links:
webbrowser.open(links[event])
for key in links:
window[key].bind('<Enter>', '<Enter>')
window[key].bind('<Leave>', '<Leave>')
window[key].set_cursor('hand2')

# if user wants to quit or window was closed
if event == sg.WINDOW_CLOSED or event == 'Quit':
break
elif event.endswith('<Enter>'):
element = window[event.split('<')[0]]
element.update(font=font_ul)
elif event.endswith('<Leave>'):
element = window[event.split('<')[0]]
element.update(font=font12)
# if link has been clicked open URL
if event in links:
webbrowser.open(links[event])

# Finish up by removing from the screen
window.close()
Expand Down