Re: Dynamic UI
Re: Dynamic UI
- Subject: Re: Dynamic UI
- From: "M. Uli Kusterer" <email@hidden>
- Date: Sun, 30 Nov 2003 18:40:11 +0100
At 17:03 Uhr +0000 30.11.2003, George Bridgeman wrote:
I've seen this done in Windows MFC applications, and the scenario
above would be done by creating a new CEdit, storing a pointer to
it, and adjusting the properties before it is displayed on the
screen. This can be done for all types of control with no real
problem. Is there a similar way to do this with Cocoa? As the UI is
defined by the NIB file, I'm guessing not.
Of course you can. If you want to create a more complex set of
controls, look at my UKProgressPanel class (available on my web
site), which loads an NSView containing a number of items into a
window. You can load several copies of this group of views.
If you need something even more detailed (e.g. if you're loading UI
elements from your own hand-grown XML file format), you can create a
view just like any other object:
[[NSButtonView alloc] initWithFrame: myRect];
will create a view at the specified position and size. Set it up, and
then you can insert it into any superview using the owning view's
addSubview: method.
Most of the calls for this can be found by taking a quick peek at
NSView.h (Type Command-D in Project Builder/xCode and enter the file
name to bring up the file quickly). If you need documentation on
these calls, Double-click on the function's name with the option key
held down and the documentation browser window will pop up.
--
Cheers,
M. Uli Kusterer
------------------------------------------------------------
"The Witnesses of TeachText are everywhere..."
http://www.zathras.de
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
References: | |
| >Dynamic UI (From: George Bridgeman <email@hidden>) |