开发者

NSMenuItem not responding to setIndentationLevel:

开发者 https://www.devze.com 2022-12-24 16:36 出处:网络
If I call setIndentationLevel: on an NSMenuItem then nothing happens, if I call indentationLevel on it after I set it to 3, it returns 3 like it should. I\'m adding the menu items to the Dock menu and

If I call setIndentationLevel: on an NSMenuItem then nothing happens, if I call indentationLevel on it after I set it to 3, it returns 3 like it should. I'm adding the menu items to the Dock menu and I don't see anything changing.

NSMenuItem *menuItem = [[NSMenuItem alloc] initWithTitle: @"title" action: nil keyEquivalent: @""];
[menuItem setInde开发者_JAVA技巧ntationLevel: 3];
[dockMenu addItem: menuItem];


I think this may be because you can't customize dock menu Items like that, but I am not sure. Maybe you should try to do this all in IB?

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号