Re: How to position a window under a button of another window?
Re: How to position a window under a button of another window?
- Subject: Re: How to position a window under a button of another window?
- From: Johan Kool <email@hidden>
- Date: Tue, 17 Apr 2007 13:36:47 +0200
Small correction, this way it works in your sample app:
- (IBAction)openDatePickerPopup:(id)sender
{
// Position the panel
NSPoint originOnScreen = [[sender window] convertBaseToScreen:
[sender frame].origin];
NSRect popupFrame = [popupPanel frame];
popupFrame.origin = originOnScreen;
[popupPanel setFrame:popupFrame display:YES];
// Show panel
[popupPanel makeKeyAndOrderFront:self];
}
Johan
---
http://www.johankool.nl/
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden