如何在 Python 中为应用程序设置专用屏幕区域? [英] How can I set up a dedicated screen area for an application in Python?

查看:23
本文介绍了如何在 Python 中为应用程序设置专用屏幕区域?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

一个很好的例子是 MS OneNote.它可以选择固定在屏幕的一侧并将所有其他窗口推到一侧.在最大化或调整其他窗口时,它们只能扩展到 OneNote 的边缘.Python 是否具有使用 Tkinter 或其他模块的此功能?感谢您的帮助.

解决方案

您正在寻找的 win32 功能称为 应用程序桌面工具栏 - 它允许您的应用程序与外壳配合并沿侧面保留空间,类似于任务栏.>

如果您想自己实现这一点,您可能需要以某种方式使用 Win32.

看起来有一个 python 包装器,但是:搜索 python 和 appbar 出现 wxAppBar 似乎是它的 Python 包装器.

A good example is MS OneNote. It has the option to be fixed to one side of the screen and pushes all other windows to the side. When maximizing or resizing other windows, they can only expand up to the edge of OneNote. Does Python have this capability using Tkinter or another module? Thank you for any assistance.

解决方案

The win32 feature you're looking for is called Application Desktop Toolbars - it allows your application to cooperate with the shell and reserve space along the side, similar to the taskbar.

If you want to implement this yourself, you'll likely need to use Win32 somehow.

It looks like there's a python wrapper for this, however: searching for python and appbar turned up wxAppBar which seems to be a python wrapper for it.

这篇关于如何在 Python 中为应用程序设置专用屏幕区域?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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