• 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: Expanding a window and adding controlls dynammicaly.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Expanding a window and adding controlls dynammicaly.


  • Subject: Re: Expanding a window and adding controlls dynammicaly.
  • From: Matt Neuburg <email@hidden>
  • Date: Thu, 04 May 2006 10:06:41 -0700
  • Thread-topic: Expanding a window and adding controlls dynammicaly.

On Thu, 04 May 2006 21:47:09 +0530, Anoop <email@hidden>
said:

>I Need to add some controls dynamically at a specified location of my window
>controller. How is it possible for me to add my button to a location without
>using interface builder.

This is a FAQ, so please look at the archives. Basically, in your code, you
can either slap a previously made NSView (from the nib) into the window, or
you can just create controls completely dynamically (in the usual way, with
alloc-init...) and pop them into the window. Remember, a control is an
NSView. RTFM on NSView to learn how to put one NSView inside another:

<file:///Developer/ADC Reference Library/documentation/Cocoa/Conceptual/
CocoaViewsGuide/WorkingWithAViewHierarchy/chapter_4_section_5.html>

m.

--
matt neuburg, phd = email@hidden, <http://www.tidbits.com/matt/>
A fool + a tool + an autorelease pool = cool!
AppleScript: the Definitive Guide - Second Edition!
<http://www.amazon.com/gp/product/0596102119>



 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Prev by Date: Problem with "whose clause" resolution
  • Next by Date: Re: Equivalent of isKindOfClass for Foundation Types?
  • Previous by thread: Problem with "whose clause" resolution
  • Next by thread: Job opportunity in South Florida
  • Index(es):
    • Date
    • Thread