Re: Creating controls dynamically
Re: Creating controls dynamically
- Subject: Re: Creating controls dynamically
- From: Matt Neuburg <email@hidden>
- Date: Tue, 22 Mar 2005 08:58:12 -0800
On Tue, 22 Mar 2005 18:16:16 +0530, "Rohit Bhatia" <email@hidden>
said:
>Hi all,
> I am working on a window based application, and I am in a
>situation where I need to generate Picture Boxes (or NSImageView) at run
>time based on some specifications. For eg. I need to generate 5 boxes at
>certain set of coordinates and of certain size, that can hold different
>JPEG images. A basic guidance for how to go about it would be really
>helpful. Kindly let me know how to add controls dynamically on a view.
An NSImageView is an instance like any other instance and is generated in
exactly the same way - alloc/init (where for "init" you must sustitute the
designated initializer). Then just call addSubview: or whatever. Watch your
memory management. m.
--
matt neuburg, phd = email@hidden, <http://www.tidbits.com/matt/>
A fool + a tool + an autorelease pool = cool!
AppleScript: the Definitive Guide
<http://www.amazon.com/exec/obidos/ASIN/0596005571/somethingsbymatt>
_______________________________________________
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