I would like to right-align the text of menu items, I found a sparse solution, but it depends on the number of characters of each menu title (working with spaces):
NSString *string=[NSString stringWithFormat:@"Text: %12@",Text];
If there'd be another kind of class to use the menu item text instead of NSString
, perhaps I could then use paragraphStyle
.
Both
NSMenuItem
andNSStatusItem
allow you tosetView:
to provide a custom set of content. To this view you can add 2 labels, one left aligned and one right aligned (and whatever width you like).