简体   繁体   中英

How to use platform specific "ports" for wxPython (e.g. wxMSW)?

I wish to use the wxPython class NotificationMessage in Windows. If doing so from a "TaskBarIcon" (ie a system tray app), there is an ugly glitch which is apparently resolved in the MSW port (via a preemptive function call to patch this special context). Here's some wxPython documentation indicating this:

https://docs.wxpython.org/wx.adv.NotificationMessage.html#wx.adv.NotificationMessage.UseTaskBarIcon

The problem I have, is the only instructions I see regarding how one employs the MSW port, is only seemingly in regards to the C++ wx library? https://docs.wxwidgets.org/trunk/page_port.html#page_port_wxmsw

I see nothing explaining how any of these platform specific ports are integrated into the wxPython library, as opposed to using them in C++ projects. Do I need to build wxPython from source, perhaps, with this "port" / flavor somehow? Or, would I need to include the dlls (or.so's) in my python project and make calls into them directly?

Overall this library, and it's documentation, is really excellent but I'm tripped up by this point.

I was able to solve my immediate problem by using the TaskBarIcon function ShowBalloon() instead. It does the exact same thing, without the glitch.

That said, I still would very much like to know what the answer is to the original question, before I encounter another platform specific situation like this, requiring one of these wx "ports"...

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM