• 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: Uli Kusterer <email@hidden>
  • Date: Thu, 4 May 2006 19:39:43 +0200

Am 04.05.2006 um 18:17 schrieb Anoop:
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.

Do you really mean "dynamically"? As in: What controls and where they go and what their titles and values are is decided at runtime?


Or do you just have a couple of predefined views that you need to swap out and maybe change their titles? For the latter you can still use IB. Just use an NSTabView without tabs or a border. You can make the first tab empty and then make current the tab whose items you need visible right now.

To dynamically create controls works basically like creating any other object: Just call alloc and the designated initialiser and set up the properties and add it to whatever superview you want.

Cheers,
-- M. Uli Kusterer
http://www.zathras.de


_______________________________________________ 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
References: 
 >Expanding a window and adding controlls dynammicaly. (From: Anoop <email@hidden>)

  • Prev by Date: Re: Equivalent of isKindOfClass for Foundation Types?
  • Next by Date: Re: Problem with prebinding and Frameworks
  • Previous by thread: Re: Expanding a window and adding controlls dynammicaly.
  • Next by thread: -[_NSControllerObjectProxy count]: selector not recognized
  • Index(es):
    • Date
    • Thread