• 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: Cocoa newbie question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Cocoa newbie question


  • Subject: Re: Cocoa newbie question
  • From: Shawn Erickson <email@hidden>
  • Date: Fri, 23 Jul 2004 15:30:57 -0700

On Jul 23, 2004, at 3:01 PM, joseph wrote:

Hello,

Is-it possible to create a GUI object (interface Builder) dynamically (a NSTextField for instance) ?
I have not found an object's method in the class ...

Yes.

Note that NSTextField inherits from NSControl which inherits from NSView, etc. (look at the top of the NSTextField docs).

NSControl defines an initWithFrame: method (as does NSView). Always look up the inheritance stack to understand what methods are available to you.

So create one with the appropriate frame, configured as desired and add it to the appropriate super view adjusting resize behavior as desired (NSView provided methods), etc.

-Shawn
_______________________________________________
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.


References: 
 >Cocoa newbie question (From: joseph <email@hidden>)

  • Prev by Date: Re: Cocoa newbie question
  • Next by Date: Re: Cocoa newbie question
  • Previous by thread: Re: Cocoa newbie question
  • Next by thread: Problem with NSScrollView & NSImageView
  • Index(es):
    • Date
    • Thread