Hi Mr. Gecko,

I made a borderless window which I wanted to be resizable, so I put a copy of resize.png in my app's resources. During startup, I add it to the bottom right corner of my window, then by implementing mouse down and mouse dragged, implement my own window resizing mechanism. It's a little bit of work but the end result works fine. In -mouseDown, I check if the event is in the grow box region, and set a BOOL isResizing ivar. In -mouseDragged I check isResizing to see if I need to resize the window or just let it be moved around.

Ron

On 05/12/2008, at 3:28 PM, Mr. Gecko wrote:

Ok so I've done some looking around more in the documents, would it be possible to make a button that has a picture of the grow box and than have it send an action when it's dragged using NSLeftMouseDraggedMask.

On Dec 4, 2008, at 8:47 PM, Sean McBride wrote:

Ron Fleckner ([EMAIL PROTECTED]) on 2008-12-04 12:52 AM said:

Hello, I'm writing a custom window for my application, but I can't
figure out how to make a custom resize image... Any help?

Thanks,
Mr. Gecko

Unless you actually want a 'custom' resize image, you can use the real
one found at /System/Library/WidgetResources/resize.png

If you wanted to draw the standard grow box, you could use
HIThemeDrawGrowBox(). Relying on that file being at that location is fragile.

But...

Mr. Gecko ([EMAIL PROTECTED]) on 2008-12-04 1:01 PM said:

I'm not needing to know how to draw it, I'm needing to know how to
make it functional. so if someone clicks and drags it would resize the
window.

That's not at all what you asked. :)  Perhaps you could clarify?  To
change a window's size you can use the setFrame... methods.

Sean




_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to