问题
I am trying to make displayed message fonts bigger for certain messages when it get displayed so that its easier for eyes to read than standard size. I checked on past post regarding this issue and couldn't found any answers that helps. I found answer using r.option_add but it seems not to have any effect on windows. If any one has gone through this issue and have suggestion/answer to fix this problem i would be thankful to everyone who put their time and effort on it. Thank you.
Code i found on previous posts or link: https://grokbase.com/t/python/tkinter-discuss/054chdx51f/font-control-in-tkmessagebox
from tkinter import *
from tkinter import messagebox
r = Tk()
r.option_add('*font', 'Helvetica-18')
messagebox.showinfo(message='Hello')
回答1:
In the Tcler's wiki it says: "With recent versions, the Windows messageBox is "native"...", which as far as I can tell means it's using a windows component and you can't change the mesage box font.
You could try to make your own custom dialog with the help of tkinters simpledialog. Have a look at effbot: Dialog Windows
来源:https://stackoverflow.com/questions/53694345/how-to-change-font-size-of-messages-inside-messagebox-showinfomessage-hello