I am developing a program that generates a notification upon completion. It is clickable and I would like to exaggerate this by underlining or bolding "Click here" in the notification. Is this possible? If it's not a feature in win10toast, is there another module I could use?
Asked
Active
Viewed 207 times
1 Answers
1
try:
from win10toast import ToastNotifier
def return_with_underline(x):
lst1 = []
for letter in x:
if letter != ' ':
lst1.append(letter)
lst1.append('\u0332')
else:
lst1.append(letter)
return '{:s}'.format(''.join(lst1))
toaster = ToastNotifier()
toaster.show_toast(return_with_underline('Click Here!'), "Hi", icon_path=None, duration=5)
This is not perfect (does not work with spaces), but you can use other Unicode characters too, instead of \u03232
Got this from here (they are talking about plain strings but it works here too):

KetZoomer
- 2,701
- 3
- 15
- 43
-
would you mind marking my answer as the correct one by click the check mark? Thanks!! – KetZoomer Aug 28 '20 at 21:33