How can I set up a dedicated screen area for an application in Python?

社会主义新天地 提交于 2019-12-05 01:42:58

问题


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.


回答1:


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.




回答2:


See the Microsoft documentation on "Windows" and "Window Features". This being windows-specific stuff, the only way to set these properties is using the Win32 API or similar.

The pywin32 module exposes the Win32 API to Python. There's even a pywin32 tag!




回答3:


Tkinter has very little control over the behavior of the rest of the windows on the OS. There's no built-in cross-platform function for this.



来源:https://stackoverflow.com/questions/9371916/how-can-i-set-up-a-dedicated-screen-area-for-an-application-in-python

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!