If you are using the main C++ distribution of wxWidgets, Feel free to ask any question related to wxWidgets development here. This means questions regarding to C++ and wxWidgets, not compile problems.
- Experienced Solver
- Posts: 75
- Joined: Thu Jul 25, 2019 12:31 pm
I'm developing an application with a top menu bar, along with some drop-down menus. This works fine, however I'd also like to use a part of the menu bar (ideally the top right corner) to display the system time. Is there any way to display (and periodically update) a wxStaticText, or some equivalent class, in the top menu bar?
Here is a screenshot of a portion of the application window:
Edit: so far I've managed to add another menu to the menu bar, disable it, and update the string as follows:
Code: Select all
It works, but its not the best solution. The clock is grayed out and isn't clearly visible. Ideally, i'd like to place it in the right corner of the menu bar. Any other solutions would be appreciated.
- Part Of The Furniture
- Posts: 4529
- Joined: Sat Apr 16, 2005 7:22 am
- Location: USA, Ukraine
I don't think its possible.
Menu bar is just that - menu bar.
You can try to dive into the wxAUI and see if that possible. Or you can try to see if generic meu bar will let you do that.
Or another possibility - use wxWindow instead of wxMenuBar. But then you will need to handle everything yourself.