Opened 2 years ago

Last modified 2 years ago

#17630 new enhancement

New API Command: position a menu in the top right corner

Reported by: lelldorin Owned by: nobody
Priority: normal Milestone: Unscheduled
Component: - General Version: R1/beta3
Keywords: Cc:
Blocked By: Blocking:
Platform: All


Would it be possible for Haiku to implement a command to set a menu in the right of the menubar?

So far, these are always on the left, and then below.

I would welcome that, because it allows you to better highlight certain program areas, e.g. help areas.

Change History (2)

comment:1 by bruno, 2 years ago

It is not always on the left side!

comment:2 by pulkomandy, 2 years ago

You can already do this, you need to create a subclass of BMenuBar and use the B_ITEMS_IN_MATRIX disposition instead of B_ITEMS_IN_ROWS. Then you can control exactly where each item is located, by calling the version of AddItem with a BRect for each menu item you want to add.

Note however that this could be a bad idea: depending on user settings, the top right side of maximized windows may be under the deskbar, making it much harder to reach than the left side. People may also not even see that there is a menu lost there on the other side.

If all you want is separating a menu from the others, it may be a better idea to simply add separators to your menu bar using the AddSeparator function. This will draw a small vertical bar in the menu bar, visually separating the menus.

Note: See TracTickets for help on using tickets.