开发者

How do stop panels from becomming key window on launch?

开发者 https://www.devze.com 2022-12-14 20:44 出处:网络
I have a x开发者_如何学Cib file with a main window and a panel. On awakeFromNib I try to orderFront the main window, but the panel keeps being key window.

I have a x开发者_如何学Cib file with a main window and a panel. On awakeFromNib I try to orderFront the main window, but the panel keeps being key window.

- (void)awakeFromNib {
[inspectionPanelOutlet orderBack:self];
[inspectionPanelOutlet orderWindow:NSWindowBelow relativeTo:0];
[window makeKeyAndOrderFront:self];
}

This code has no effect.


Are you sure awakeFromNib is called (add an NSLog message and see if it fires)? If it is called you might want to try:

[self makeMainWindow];

or

[self makeKeyWindow];
0

精彩评论

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