performClickWithFrame draw with offset if coordinates are flipped
performClickWithFrame draw with offset if coordinates are flipped
- Subject: performClickWithFrame draw with offset if coordinates are flipped
- From: Dany Golubitsky <email@hidden>
- Date: Sun, 13 Nov 2011 09:18:42 -0500
- Acceptlanguage: en-US
- Thread-topic: performClickWithFrame draw with offset if coordinates are flipped
I am trying to implement a popup control in the Cocoa view. The view coordinates are flipped (function IsFlipped returns YES, the (0,0) coordinates are at the TopLeft corner).
Here is the peace of code:
NSRect frame = NSMakeRect(x_coordinate, y_coordinate, 32.0f, 32.0f);
NSPopUpButtonCell *popUpButtonCell = [[NSPopUpButtonCell alloc] initTextCell:@"Dummy" pullsDown:pullsDown];
[popUpButtonCell performClickWithFrame:frame inView:view];
For some reason, the popup is appearing constant 20px below the provided coordinates!
Did someone encountered similar problem?
Thanks!
[cid:email@hidden5F0]
Danny Golubitsky
Software Engineer
Waves Audio Ltd
Tel: +972 3 608 4157
Fax: +972 3 608 4056
www.waves.com<http://www.waves.com>
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please 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