Is possible to add MenuItem
(or second Menu
) on the right side of the application window (as on image below)?
A partial answer to your questions is that a second menu bar cannot be added. Reference here.
Every shell can optionally display a single menu bar using the setMenuBar(Menu menuBar) method of Shell. It's possible to create many menu bars in a shell, but only one can be visible in a shell at a time.
Perhaps you can try creating a second shell window that hovers over the location where you want your second (right-aligned) menu. You will need to ensure that this shell always remains attached to that particular corner of the window. You might have problems if the size of the main shell is reduced, which might show one menu overlapping the other. Not a nice solution though. Perhaps use a toolbar instead with a filler (SWT#SEPARATOR_FILL
) item?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With