问题描述
有没有办法改变一个小部件(在这种情况下是 ttk.frame)的父级?我在小部件 .config 中找不到任何要使用的关键字.这在 python tkinter 中是不可能的吗?我想要的功能是在我的 tkk.notebook 小部件中获取我当前的框架,当我双击选项卡时,将所有内容都放在选项卡的框架中,移动到它自己单独的 TopLevel 窗口.这样,用户可以在处理另一个选项卡时对该选项卡进行视觉参考.如果没有我要询问的框架功能,我想不出任何其他方式来实现这一点.也许如果有人能绕过这个问题,我就不需要担心父小部件的功能了.
Is there any way to change a widget's (ttk.frame in this case) parent? I can't find any keywords to use in the widgets .config. Is this not possible in python tkinter? What I'd like functionally is to take my current frame in my tkk.notebook widget, and when I double click the tab, to have everything in the frame of the tab, move to it's own separate TopLevel window. This way the user can have a visual reference to that tab while working on another tab. I couldn't think of any other way to have this happen without the frame functionality I'm asking about. Perhaps if anyone can circumvent this issue, I won't need to worry about parent widget capabilities.
干杯,克里斯
推荐答案
An 旧帖 byFredrik Lundh(Tkinter 的作者)建议无法更改小部件的父级.
An old post by Fredrik Lundh (the Tkinter author) suggests that it isn't possible to change a widget's parent.
这篇关于你可以在 python tkinter 中更改小部件的父级吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!


大气响应式网络建站服务公司织梦模板
高端大气html5设计公司网站源码
织梦dede网页模板下载素材销售下载站平台(带会员中心带筛选)
财税代理公司注册代理记账网站织梦模板(带手机端)
成人高考自考在职研究生教育机构网站源码(带手机端)
高端HTML5响应式企业集团通用类网站织梦模板(自适应手机端)