tkinter-WebView widget, based on InternetExplorer.Application
Project description
tkinterIE
基于InternetExplorer.Application
的WebView组件。
使用方法
WebView(master,width:int,height:int,url:str='',**kw)
'''
master::父组件
width::初始宽度
height::初始高度
url::网址或html文件,可以为空
**kw::其它Frame参数
'''
例子:
from tkinter import Tk
from tkinterie.tkinterIE import tkinterIE
import clr
clr.AddReference('System.Threading')
from System.Threading import Thread,ApartmentState,ThreadStart
def main():
a=Tk(classname='test tkinterie')
a.geometry('1200x700')
w=tkinterIE.WebView(a,1200,700,'www.baidu.com')
w.pack()
a.mainloop()
if __name__=='__main__':
t = Thread(ThreadStart(main))
t.ApartmentState = ApartmentState.STA
t.Start()
t.Join()
必须在STA线程模式下运行。
方法
navigate(url:str)
指向一个网址或者是html文件路径。
What's new
-1.3.0-
Use WinForms' WebBrowser, but it must runs in STA thread mode.
-1.2.0-
WebView will be destroyed when father widget destroys.
-1.1.0-
WebView can resize itself when father widget's size changes.
-1.0.0-
Upload to PYPI.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
Close
Hashes for tkinterie-1.3.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1e4b4e1c0d4e002e977cad17c20b19067b1161406ab83c34bc520843ecaea15a |
|
MD5 | 86a65f4494efd124d631863de88404bc |
|
BLAKE2b-256 | 44d8fba4feb39f28a3ec2411b64d4dca211c326f2682ed82e22aa7051b6eec1d |