Disappearing buttons in window.
Disappearing buttons in window.
- Subject: Disappearing buttons in window.
- From: Mohsan Khan <email@hidden>
- Date: Thu, 15 Jun 2006 18:03:54 +0200
Hi
I have a NSWindow which is loaded from the nib and displayed.
http://xybernic.com/tmp/before.png
If i click the About button which will display the standard about
dialog, or if I click in the background.
Some of the buttons disappear, its always the same buttons.
http://xybernic.com/tmp/after.png
I don't know why this happens, here is my code.
--------------------------------------------------
- (void)awakeFromNib
{
[mDeleteButton setEnabled: false];
[self initMainWindow];
}
- (void)initMainWindow
{
// center the window
[mMainWindow center];
// place at top, under the menu
NSRect screenRect = [[NSScreen mainScreen] visibleFrame];
NSRect windowRect = [mMainWindow frame];
NSPoint p = windowRect.origin;
p.y = screenRect.size.height -10;
[mMainWindow setFrameTopLeftPoint: p];
// make the window translucent
NSColor *translucent = [NSColor colorWithDeviceRed: 0.8 green: 0.8
blue: 0.8 alpha: 0.8];
[mMainWindow setOpaque: false];
[mMainWindow setBackgroundColor: translucent];
//[mMainWindow setAlphaValue: 0.9];
// make window float
[mMainWindow setLevel: NSFloatingWindowLevel ];
// show window in front
[mMainWindow makeKeyAndOrderFront: nil];
}
--------------------------------------------------
Yours sincerely,
Mohsan Khan.
_______________________________________________________________
Programmer, Animator, Musician
www.xybernic.com
There is no place like 127.0.0.1.
If everybody would give everybody a million would everybody be
millionaires?
Nothing has got to do with anything, but something has got to do with
everything.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden