Re: Dynamic View Creation
Re: Dynamic View Creation
- Subject: Re: Dynamic View Creation
- From: Ondra Cada <email@hidden>
- Date: Sun, 16 Dec 2001 13:32:56 +0100
Brian,
>
>>>>> Brian Webster (BW) wrote at Sat, 15 Dec 2001 21:36:28 -0600:
BW> >Now, from a programming standpoint, I want to be able to add/remove
BW> >views based on the View that I created. How do I dynamically place a
BW> >new View in a window? How do I dynamically add the necessary outlets
BW> >and action callbacks?
BW>
BW> To create a view programatically, you can simply say
BW>
BW> NSView *myView = [[NSView alloc] initWithFrame:NSMakeRect(myX,
BW> myY, myWidth, myHeight)];
Right, but in a vast majority of cases it is more convenient to prepare the
view in IB and load it from a separate NIB, just the very same way you
normally load windows and others.
---
Ondra Cada
OCSoftware: email@hidden
http://www.ocs.cz
2K Development: email@hidden
http://www.2kdevelopment.cz
private email@hidden
http://www.ocs.cz/oc