Tk 框架内的 Chrome 网页 [英] Chrome webpage inside a Tk frame

查看:37
本文介绍了Tk 框架内的 Chrome 网页的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在 Tcl Tk 框架内运行我的 chrome 页面.而且我必须从 Windows 平台运行我的脚本......到目前为止,我可以使用 start 命令启动 chrome 页面.如何将我的 chrome 页面包含在 Tk 窗口中?

I want to run my chrome page inside a Tcl Tk frame. And I have to run my scripts from windows platform... As of now I am able to start the chrome page using the start command. How do I enclose my chrome page inside Tk window?

eval exec [auto_execok start] http://www.gmail.com

谢谢

推荐答案

我不认为你能做到这一点.您可以使用 -container 选项将应用程序嵌入到 Tk 框架中.通知 Tk 此框架将用于托管第三方窗口.然后,您必须将窗口 id (winfo id $frame) 传递给应用程序,以便它知道将此 Tk 框架用作其父级.Tcl wiki 上有一个 embedding mplayer 示例,并使用了 mplayer 的 -wid 选项.我看不到铬(铬)中没有选项可以接受嵌入的窗口.有一个 chromium embedding 项目可能值得研究.

I don't think you can do this. You can embed applications into Tk frames using the -container option which informs Tk that this frame will be used to host third-party windows. You then have to pass the window id (winfo id $frame) to the application so that it knows to use this Tk frame as its parent. There is an example embedding mplayer on the Tcl wiki and uses mplayer's -wid option. I can see no option in chrome (nor in chromium) that would accept a window to embed into. There is a chromium embedded project which may be worth looking into.

这篇关于Tk 框架内的 Chrome 网页的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆