Re: Expanding a window and adding controlls dynammicaly.
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