帮助Tkinter Alpha [英] Help with Tkinter Alpha

查看:83
本文介绍了帮助Tkinter Alpha的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

由于 self.overrideredirect(1),我有一个没有Windows框架并且没有显示在任务栏中的python程序.该程序具有一个选项菜单(一个顶级小部件),该菜单允许使用 self.attributes(-alpha",0.85)调整Alpha.但是,当我退出选项菜单时,我的程序将显示在任务栏中.显然,我不希望它这样做.我尝试在关闭选项菜单后调用 self.overrideredirect(1)命令,但无济于事.有没有人有解决方案/知道会从任务栏中删除我的程序的行?

I have a python program that has no windows frame and doesn't show up in the taskbar because of self.overrideredirect(1). This program has an options menu (a top level widget) that allows for the alpha to be adjusted with self.attributes("-alpha", 0.85). However when I close out of the options menu my program shows up in the task bar. Obviously I don't want it to do this. I tried invoking the self.overrideredirect(1) command after the options menu was closed, but to no avail. Does anyone have a solution/ know of a line that will remove my program from the task bar?

推荐答案

如果更改了覆盖重定向标志,则需要撤消然后取消图标化窗口,以使窗口管理器有机会进行更改.您可以尝试一下.

If you change the override redirect flag you need to withdraw and then deiconify the window to give the window manager a chance to make the change. You might try that.

此外,当您在顶层说关闭"选项菜单时,您的意思是什么?您确定要销毁第二个顶层窗口吗?

Also, when you say "close out" the option menu top-level, what exactly do you mean? Are you sure destroying this second top-level window?

这篇关于帮助Tkinter Alpha的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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