Re: hopefully a simple one
Nathan smith <[email protected]> Thu, 4 Feb 2021 12:33:42 +0000
| Newsgroups | gmane.comp.python.wxpython |
|---|---|
| Message-ID | <[email protected]> |
Hi folks, Just in case someone has this problem in the future. I'm not sure if it would have worked with the wx version, but if you use win32con.VK_ and then Media_playpause and such, it works perfectly irrespective of WX version. Best Nathan On 02/02/2021 23:25, Transana wrote: > Hi Nathan, > > What version of wxPython are you using? What OS? What python version? > > In version 4.1.1 on Windows 10, I see these constants in the wx > package. I also see them in version 4.1.1 on macOS Catalina. (I'm > using Python 3.7 on both platforms.) > > David > > > > On 2/2/21 5:16 PM, Nathan smith wrote: >> Hello Group, >> >> >> I hope everyone is keeping safe. >> >> I have a hopefully easy question this time, something I'm sure is >> obvious and I'm just typoing somewhere. >> >> I'm trying to bind to the play, stop, next and previous media buttons >> on the keyboard, shown below: >> >> >> self.RegisterHotKey(self.mid1, None, wx.WXK_MEDIA_NEXT_TRACK) >> self.RegisterHotKey(self.mid2, None, wx.WXK_MEDIA_PREV_TRACK) >> self.RegisterHotKey(self.mid3, None, wx.WXK_MEDIA_PLAY_PAUSE) >> self.RegisterHotKey(self.mid4, None, wx.WXK_MEDIA_STOP) >> >> >> Sadly, I get AttributeError: module 'wx' has no attribute >> 'WXK_MEDIA_NEXT_TRACK' >> >> >> Did I miss something? I got these attributes from the website... >> >> Best >> >> Nathan >> -- You received this message because you are subscribed to the Google Groups "wxPython-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/wxpython-users/2f5c9ef6-2b14-7929-f0d7-6e92816493e5%40gmail.com.