Tk 框架内的 Chrome 网页

编程入门 行业动态 更新时间:2024-10-16 19:22:05
本文介绍了Tk 框架内的 Chrome 网页的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

限时送ChatGPT账号..

我想在 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

谢谢

推荐答案

我不认为你能做到这一点.您可以使用 -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屋!

更多推荐

[db:关键词]

本文发布于:2023-05-01 09:18:41,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1407721.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:框架内   网页   Tk   Chrome

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!