wx.adv.NotificationMessage on Windows 10?

Im currently in the process of porting over an old wxpython app to python3.8 and wxpython 4.1.
Since the application is windows only i used ShowBalloon in the past for notifications which still works but wanted to us the new NotificationMessage Method for more functionality.

Sadly i can’t get anything to work regarding the new Features (MSWUseToasts, AddAction) and i can’t even bind on-click events anymore. Im not sure really how to use MSWUseToasts, especially without building an exe first and AddAction just outputs False but there is no mention that this should not work on Windows 10.

When i try to bind on of the new events i get the following:
module 'wx.adv' has no attribute 'EVT_NOTIFICATION_MESSAGE_CLICK'

As there are no examples available regarding the advanced usage im stuck atm. Are these features fully implemented and on which platform? What am i doing wrong?

I haven’t had a need to use balloon tips. But there is an example in wxPython Demo 4.1 under the Ballon tip. Hope that helps.

demo -> NEW Recent Additions/Updates -> NotificationMessage

Thanks for the replies, but like i said the old ShowBallon Method workes still fine in 4.1, even binding events to it works fine as well (using wx.adv.EVT_TASKBAR_BALLOON_CLICK).

But im talking about the wx.adv.NotificationMessage which is supposed to have additional features like ToastMessages (on Windows, without taskbaricon) and the possibility to add Actions to the Notification.

The code of the demo works fine and i can get Notifications working with this method but there are no examples of binding events or actions to it and like i said EVT_NOTIFICATION_MESSAGE_CLICK (or any other events listed on https://wxpython.org/Phoenix/docs/html/wx.adv.NotificationMessage.html) is not accepted and AddAction returns False as well. Just wondering on which platfrom this is supported. I can’t find any additional info.

it does not work on my Windows (Home edition) either (I suppose there is not enough OLE); but it works when I plug-in my back-up: I press the message and a choice pops up; for me the whole thing looks like a mimic of the phone and MS doesn’t want to look old as U name it…

What is your backup system? Can you bind those events? If you can post a small example with working actions would be great.

Well, I’m a bit old fashioned and still use Windows 7 back up and therefore the whole message dialogue happens in the os (that’s why it works); I think when a driver update comes down one can choose on the message directly whether to install now or later; but I can’t remember a non system app using this mechanism although I use mainly free stuff and suppose they haven’t got the resources for (marketing) gimmicks like this
But if you get a word out of the wx.developer whether this is work in progress or dead end I herewith subscribe to the publication (although in my own work I can’t think of a use case) :dizzy_face:

Yeah my app kind of relies on it. background checks if updates are available and informs the user. I woul love to display buttons (list updates / install). If this isnt possible and not available in the future i might need to implement my own Notification system.

I apologise for me not seeing the use case and fully agree with you: everything running in the background needs it (the virus scanner is also using it and from there one can go directly to its settings)
I also admit that doing something like that in wx won’t look nearly as smart

Yeah i think this is only possible (with actions) in Windows 10 but since Win7 is EOL this wouldn’t be a big issue anyway for my usecase. Hope some dev will shine some light on this issue.
A wx native solution would work but why implement something when it could be implemented more natively.

Well, organizationally the wx solution would be an app specific noticeboard whereas the windows effort is system wide and the app only appears in the header and in this case under ‘Python’, no more specific; on top of that one can delete it without leaving any trace; so using it for a ‘lose’ os noticeboard it’s ok but for a serious application, I would say, it’s too fluffy
However, I’m totally with you that advertising a class with apparently a method which isn’t implemented and the event binders not even in the namespace must be credited to free software; nevertheless Python + wxPython for me is great fun

I would also LOVE to be able to work with the EVT_NOTIFICATION_MESSAGE_CLICK event specifically for toast Notifications clicked.

ShowBalloon and the Event wx.adv.EVT_TASKBAR_BALLOON_CLICK still seems to work on the latest wxpython. So if you just want to register notification clicks it works fine on windows.

I was looking for more interactive notifications with button options which the new Notification method suggests to exist but are not functional yet (atleast under windows) .

I get that, but they must be Windows 10 toast notifications. And I too want more interactions, but registering clicks (on this toast messages) is what I need to start with.

If its just looks on Windows 10 those Balloon Notifications look like native Windows 10 notifications.
Im not sure right now what happens if a notification wasnt “dealt with” right away and it was added to the ActionCenter, i doubt Events are still working at that point.

But i can confirm that the “old” method works fine with Windows 10 and looks native, it just is limited in its functionality.

Google’s Snackbars don’t at all entice for much actions except ‘Dismiss’ and ‘cancel’.
I’m not a programmer and for me this toasting discussion in general seems rather arbitrary but, nevertheless, entertaining… :zzz:

Well in my usecase two Options would be very nice :wink:

Notification informs of pending updates.
Two Actions are available:
Update: Updates the System right away
List Updates: show detailed information of the updates pending

Advanced users/admins might be intrested in what is pending, most users want to update right away and get things over with.

If this would work i could get this functionality working with a few lines of code, but atm i would have to implement my own notification system to get something similar working.
At the moment i dont have time to do this and will wait a bit longer and see what happens.

i stumbled upon a native toast library for python a while back but cant find the repository right now. It had more features but needed a lot of ms runtime libraries installed and also needed to be compiled as well (no simple pip to get things working.
I think i have it on my system at work, if someones intrested i can look it up.

Maybe the name is misleading.

What you describe is a frontend to a notification system: it stores notifications, one can customize which notifications, one can list all notifications and so on. That is provided on Windows under the little square bubble on the far right side of the task bar.

This notification pop-up (I think it’s a better name) is just a reminder of a new notification, no more, for otherwise things end up in a wilderness for the user of how to get at things (the coding, I assume, will be likewise)