• 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
Getting an NSView's size
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Getting an NSView's size


  • Subject: Getting an NSView's size
  • From: Candide Kemmler <email@hidden>
  • Date: Tue, 10 Jul 2001 13:50:08 +0200

Hi,

I'm trying to request an NSView's size like I would with java.awt.Component.getSize () in java.

I tried (in drawRect:(NSRect)frame):

NSLog ( @"the frame is %d, %d, %d, %d", frame.origin.x, frame.origin.y, frame.size.width, frame.size.height );
and
NSLog ( @"the bounds are %d, %d, %d, %d", [self bounds].origin.x, [self bounds].origin.y, [self bounds].size.width, [self bounds].size.height );

...but both yield 0,0,0,0

I thought the bounds would provide the information I want, but I apparently don't get something here...

CK


  • Prev by Date: Re: NSThread question
  • Next by Date: Re: Copy via Pasteboard
  • Previous by thread: Re: Bah, Networking Woes!
  • Next by thread: Re: Getting an NSView's size
  • Index(es):
    • Date
    • Thread