Click here to Skip to main content
15,892,927 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello!

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:

C++
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!
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900