将Web浏览器窗口添加到Tkinter窗口 [英] Add web browser window to Tkinter window
问题描述
我用python tkinter制作了一个gui应用程序,我想放一个小型的小型Web浏览器在我的TKINTER窗口中,而不是打开一个新标签,该怎么办?
I made a gui app with python tkinter, I want to put a little mini little web browser INSIDE MY TKINTER WINDOW, NOT OPENING A NEW TAB, how can I do that?
推荐答案
您不能. tkinter库中没有可用于显示HTML的小部件.如果您确实需要使用tkinter,则可以尝试 tkinterhtml ,但这很奇怪并且不适用于许多功能(超链接,图像...)
You can't. There is no widget in the tkinter library which allow you to display HTML. If you really NEED to use tkinter you could try tkinterhtml but it's weird and won't work for a lot of features (hyperlinks, images...)
如果您只想使用网络界面创建python应用,则最好使用python网络框架,例如烧瓶或 django .
If you just want to create a python app with a web interface, you'd better use a python web framework like flask or django.
这篇关于将Web浏览器窗口添加到Tkinter窗口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!