CPPopover Positioning Off

37 views
Skip to first unread message

Keary Suska

unread,
Feb 24, 2015, 5:10:55 PM2/24/15
to objec...@googlegroups.com
I am trying to show a popover relative to a CPTextField in a sheet, but it appears that the popover is positioned relative to the sheet, rather than the field, but only approximately. IN any case it is always way off. Is there any way to accurately position a CPPopover?

Keary Suska
Esoteritech, Inc.
"Demystifying technology for your home or business"

Kjell Nilsson

unread,
Feb 25, 2015, 5:27:31 AM2/25/15
to objec...@googlegroups.com
I have not tried to do this in a sheet but are you using:

[popover showRelativeToRect:[textfield frame] ofView:[textfield superview] preferredEdge:nil];

I am using this in a regular window.

—kerusan


--
You received this message because you are subscribed to the Google Groups "Cappuccino & Objective-J" group.
To unsubscribe from this group and stop receiving emails from it, send an email to objectivej+...@googlegroups.com.
To post to this group, send email to objec...@googlegroups.com.
Visit this group at http://groups.google.com/group/objectivej.
For more options, visit https://groups.google.com/d/optout.

Dogild

unread,
Feb 25, 2015, 12:43:03 PM2/25/15
to objec...@googlegroups.com
Hi Keary, 

Yes maybe the popover does not support the sheet. What is your code ?

Keary Suska

unread,
Feb 25, 2015, 4:43:07 PM2/25/15
to objec...@googlegroups.com
On Feb 25, 2015, at 3:27 AM, Kjell Nilsson <ker...@gmail.com> wrote:

> I have not tried to do this in a sheet but are you using:
>
> [popover showRelativeToRect:[textfield frame] ofView:[textfield superview] preferredEdge:nil];
>
> I am using this in a regular window.

I was doing:

[popover showRelativeToRect:[textfield frame] ofView:textfield preferredEdge:nil];

Passing [textfield superview] instead is doing the trick. Thanks.
Reply all
Reply to author
Forward
0 new messages