Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Re: region for window draggging
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: region for window draggging



On 5/27/06, Todd Yandell <email@hidden> wrote:

On May 27, 2006, at 11:31 AM, Brett George wrote:

> Is there a way to define which region of a window supports
> dragging? Currently, its only the top part of my window that allows
> it and i'd like to extend this region. I've read of ways to achieve
> this with a kEventControlGetPartRegion handler, but i'm wondering
> if there is a way to do it in in Cocoa?

You should subclass the view under the area that you want to enable
dragging on, and implement the mouseDown: and mouseDragged: methods,
then use those to move the view's window.

Unless you need to support 10.1, a much easier way is to send -setMovableByWindowBackground: to your window, and then play with -mouseDownCanMoveWindow in your views to determine which parts of the window actually count as movable.

Mike
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >region for window draggging (From: Brett George <email@hidden>)
 >Re: region for window draggging (From: Todd Yandell <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.