1. <small id='W0d6q'></small><noframes id='W0d6q'>

      1. <i id='W0d6q'><tr id='W0d6q'><dt id='W0d6q'><q id='W0d6q'><span id='W0d6q'><b id='W0d6q'><form id='W0d6q'><ins id='W0d6q'></ins><ul id='W0d6q'></ul><sub id='W0d6q'></sub></form><legend id='W0d6q'></legend><bdo id='W0d6q'><pre id='W0d6q'><center id='W0d6q'></center></pre></bdo></b><th id='W0d6q'></th></span></q></dt></tr></i><div id='W0d6q'><tfoot id='W0d6q'></tfoot><dl id='W0d6q'><fieldset id='W0d6q'></fieldset></dl></div>

      2. <tfoot id='W0d6q'></tfoot>
          <bdo id='W0d6q'></bdo><ul id='W0d6q'></ul>
        <legend id='W0d6q'><style id='W0d6q'><dir id='W0d6q'><q id='W0d6q'></q></dir></style></legend>

      3. 使 tkinter 窗口出现在所有其他窗口之上

        Make a tkinter window appear over all other windows(使 tkinter 窗口出现在所有其他窗口之上)
        <tfoot id='Ccqin'></tfoot>
      4. <i id='Ccqin'><tr id='Ccqin'><dt id='Ccqin'><q id='Ccqin'><span id='Ccqin'><b id='Ccqin'><form id='Ccqin'><ins id='Ccqin'></ins><ul id='Ccqin'></ul><sub id='Ccqin'></sub></form><legend id='Ccqin'></legend><bdo id='Ccqin'><pre id='Ccqin'><center id='Ccqin'></center></pre></bdo></b><th id='Ccqin'></th></span></q></dt></tr></i><div id='Ccqin'><tfoot id='Ccqin'></tfoot><dl id='Ccqin'><fieldset id='Ccqin'></fieldset></dl></div>
      5. <legend id='Ccqin'><style id='Ccqin'><dir id='Ccqin'><q id='Ccqin'></q></dir></style></legend>
          • <bdo id='Ccqin'></bdo><ul id='Ccqin'></ul>
              <tbody id='Ccqin'></tbody>

                  <small id='Ccqin'></small><noframes id='Ccqin'>

                1. 本文介绍了使 tkinter 窗口出现在所有其他窗口之上的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  #!/usr/bin/env python
                  # Display window with toDisplayText and timeOut of the window.
                  
                  from Tkinter import *
                  
                  def showNotification(notificationTimeout, textToDisplay):
                  
                      ## Create main window
                      root = Tk()
                      Button(root, text=textToDisplay, activebackground="white", bg="white", command=lambda: root.destroy()).pack(side=LEFT)
                  
                      root.update_idletasks()
                      # Remove window decorations
                      root.overrideredirect(1)
                  
                      timeOut = int(notificationTimeout*1000) # Convert to ms from s
                  
                      ## Run appliction
                      root.after(timeOut,root.destroy)
                      root.mainloop()
                  

                  上面的代码创建了一个带有超时的通知.但是在 Windows 上 - 通知不会自动弹出所有其他当前窗口的上方.必须单击终止按钮(文本),第一次将其聚焦,之后根窗口将显示在所有其他窗口之上.

                  The above code creates a notification, with a timout. However on windows - the notification does not automatically pop up above all other present windows automatically. One has to click on the kill button (the text), and focus it the first time, after which the root window will be displayed above all other windows.

                  有没有办法让通知自动出现在所有其他窗口上方 - 在窗口上?

                  Is there a way to make the notification automatically appear above all other windows - on windows?

                  它似乎在 linux 上运行得很好(ubuntu 9.10).

                  It seems to work on linux just fine (ubuntu 9.10).

                  推荐答案

                  根据这条消息 你应该可以在 root.overridedirect(1) 之后添加以下内容.此处的快速测试表明它应该适合您.

                  According to this message you should be able to add the following after root.overridedirect(1). A quick test here suggests it should work for you.

                  root.wm_attributes("-topmost", 1)
                  

                  这篇关于使 tkinter 窗口出现在所有其他窗口之上的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  Adding config modes to Plotly.Py offline - modebar(将配置模式添加到 Plotly.Py 离线 - 模式栏)
                  Plotly: How to style a plotly figure so that it doesn#39;t display gaps for missing dates?(Plotly:如何设置绘图图形的样式,使其不显示缺失日期的间隙?)
                  python save plotly plot to local file and insert into html(python将绘图保存到本地文件并插入到html中)
                  Plotly: What color cycle does plotly express follow?(情节:情节表达遵循什么颜色循环?)
                  How to save plotly express plot into a html or static image file?(如何将情节表达图保存到 html 或静态图像文件中?)
                  Plotly: How to make a line plot from a pandas dataframe with a long or wide format?(Plotly:如何使用长格式或宽格式的 pandas 数据框制作线图?)
                    • <bdo id='imG96'></bdo><ul id='imG96'></ul>
                        <tbody id='imG96'></tbody>

                      <i id='imG96'><tr id='imG96'><dt id='imG96'><q id='imG96'><span id='imG96'><b id='imG96'><form id='imG96'><ins id='imG96'></ins><ul id='imG96'></ul><sub id='imG96'></sub></form><legend id='imG96'></legend><bdo id='imG96'><pre id='imG96'><center id='imG96'></center></pre></bdo></b><th id='imG96'></th></span></q></dt></tr></i><div id='imG96'><tfoot id='imG96'></tfoot><dl id='imG96'><fieldset id='imG96'></fieldset></dl></div>
                      <tfoot id='imG96'></tfoot>

                      1. <small id='imG96'></small><noframes id='imG96'>

                            <legend id='imG96'><style id='imG96'><dir id='imG96'><q id='imG96'></q></dir></style></legend>