• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: two questions about child windows
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: two questions about child windows


  • Subject: Re: two questions about child windows
  • From: "Oscar Bascara" <email@hidden>
  • Date: Sun, 13 May 2007 21:50:02 -0700

On 5/13/07, glenn andreas <email@hidden> wrote:

On May 13, 2007, at 12:27 AM, Oscar Bascara wrote:

> I've got custom views that the user can rearrange in a canvas by
> dragging.  At first, I tried subviews which worked fine except when
> overlapping, the behavior was unpredictable.  So I'm trying child
> windows (borderless).  The behavior is more stable, but now I have
> these two questions.
>

One technique is to mix the two behaviors - basically you have a
transparent overlay window (borderless) that is the size of the
content, and then have the view within it moveable (as opposed to the
overlay window with just the view and the window moveable).  The view
is then clipped by the transparent overlay window (which corresponds
to the canvas) making it appear that it is clipped by canvas.


Great idea, thanks!

By the way, I got somewhere with the other question about changing the
z-order of child windows.  To bring a child window to the front,
remove it and then add it again:

[window removeChildWindow:childWindow];
[window addChildWindow:childWindow ordered:NSWindowAbove];

A nice part is that if this removing/adding of the child window is
done in mouseDown, it doesn't disrupt subsequent mouseDragged events
for the child window.

Oscar


Glenn Andreas email@hidden <http://www.gandreas.com/> wicked fun! Cardographer | the custom playing card designer



_______________________________________________

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


References: 
 >two questions about child windows (From: "Oscar Bascara" <email@hidden>)
 >Re: two questions about child windows (From: "Oscar Bascara" <email@hidden>)
 >Re: two questions about child windows (From: glenn andreas <email@hidden>)

  • Prev by Date: entity referencing self in relationship attribute
  • Next by Date: Re: Printing with exotic margins (a basic example)
  • Previous by thread: Re: two questions about child windows
  • Next by thread: Artifacts in toolbar
  • Index(es):
    • Date
    • Thread