• 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 real NSControl dimensions
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Getting real NSControl dimensions


  • Subject: Getting real NSControl dimensions
  • From: Mark Alldritt <email@hidden>
  • Date: Thu, 03 Apr 2003 08:56:33 -0800

Hi,

I'm trying to figure out how to get the real dimensions of a control. For
instance, in the case of NSButton, the frame/bounds include extra space for
the shadow, etc. How does one find the actual dimensions of the button?

I've hunted through NSControl, NSButton and NSButtonCell/NSCell without any
success. NSButtonCell/NSCell's titleRectForBounds, imageRectForBounds,
drawingRectForBounds don't give me the rect I'm looking for. A similar
problem exists of controls like NSTabView.

Cheers
-Mark

---------------------------------------------------------------------
Mark Alldritt Late Night Software Ltd.
Phone: 250-380-1725 333 Moss Street
FAX: 250-383-3204 Victoria, B.C.
WEB: http://www.latenightsw.com/ CANADA V8V-4M9
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Prev by Date: Revisited: NSMovieView in a panel ?
  • Next by Date: Re: stringByTrimmingCharactersInSet: Bug
  • Previous by thread: Revisited: NSMovieView in a panel ?
  • Next by thread: Re: takeValue:forKey and BOOL
  • Index(es):
    • Date
    • Thread