Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding Icon AND Text to a TaskBarIcon #2555

Open
nyxaria opened this issue May 26, 2024 · 0 comments
Open

Adding Icon AND Text to a TaskBarIcon #2555

nyxaria opened this issue May 26, 2024 · 0 comments

Comments

@nyxaria
Copy link

nyxaria commented May 26, 2024

Operating system: OSX (Mac)
wxPython version & source: pip
Python version & source: stock 3.12

Description of the problem:

I am trying to add text on the right hand side of the MenuBarIcon like this:
image

However I can't seem to be able to do this using the current wx implementation

What I've tried so far (click to expand)
app = wx.App(redirect=False)
frame = MainFrame(None)

# app.MainLoop()
from AppKit import AppDelegate, NSApp
from PyObjCTools import AppHelper
from Cocoa import NSApplication

app = NSApplication.sharedApplication()
delegate = AppDelegate.alloc().init()
NSApp().setDelegate_(delegate)
AppHelper.runEventLoop()

...

statusitem = NSStatusBar.systemStatusBar().statusItemWithLength_(-1)
statusitem.setTitle_(title)
statusitem.setImage_(icon)```
</details>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant