In my application, I am creating a simple NSMenu
with NSMenuItem
s. The title of the NSMenuItem
s are adapted to the system language. So, when the system language is an RTL language (right to left), I want my NSMenuItem
to be aligned at the right.
I can't see anyone talking about this, or any option that could make me achieve that easily.
NSMenuItem* item1;
NSMenuItem* item2;
item1 = [[NSMenuItem alloc] init];
item2 = [[NSMenuItem alloc] init];
item1.title = "foo";
item2.title = "bar";
item1.action = @selector(fooAction);
item2.action = @selector(barAction);
NSMenu *menu = [[NSMenu alloc] init];
[menu addItem:item1];
[menu addItem:item2];