• 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: Custom Window Resize Image
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Custom Window Resize Image


  • Subject: Re: Custom Window Resize Image
  • From: Ron Fleckner <email@hidden>
  • Date: Sat, 6 Dec 2008 10:39:41 +1100

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@hidden) 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@hidden) 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 (email@hidden)

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:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Custom Window Resize Image
      • From: "Mr. Gecko" <email@hidden>
References: 
 >Custom Window Resize Image (From: "Mr. Gecko" <email@hidden>)
 >Re: Custom Window Resize Image (From: Ron Fleckner <email@hidden>)
 >Re: Custom Window Resize Image (From: "Sean McBride" <email@hidden>)
 >Re: Custom Window Resize Image (From: "Mr. Gecko" <email@hidden>)

  • Prev by Date: ICA Documentation issue
  • Next by Date: Re: [SOLVED] Undocumented NSTextMovment for space in NSTextView's -insertCompletion:...
  • Previous by thread: Re: Custom Window Resize Image
  • Next by thread: Re: Custom Window Resize Image
  • Index(es):
    • Date
    • Thread