Re: Adding GUI components dynamically
Re: Adding GUI components dynamically
- Subject: Re: Adding GUI components dynamically
- From: "Thiago Rossi" <email@hidden>
- Date: Sun, 2 Mar 2008 00:18:34 -0300
Thanks for your help. I'll try it. I'm new to Objective C. Coming from Java…
On Sat, Mar 1, 2008 at 7:07 PM, Dimitri Bouniol <email@hidden> wrote:
> Easy. Create an instance of a NSButton:
> NSButton *myButton = [[NSButton alloc] initWithFrame:nsRectOfButton];
>
> Then add it to your view:
> [view addSubview:myButton];
>
> of course you might want to edit the image, title, style of the
> button, so check in NSControl and NSButton docs for the configuration
> methods.
>
> As for in iPhoto, if you mean the list of all the albums, those aren't
> buttons. Take a look at the NSTableView docs or one of it's subclasses
> to set up that sort of list.
>
> To make it short, you need to set up a NSTableView in IB, then set
> it's dataSource outlet to one of your controller classes, and
> implement certain methods in that class to supply the table view with
> content.
>
> On Mar 1, 2008, at 12:49 PM, Thiago Rossi wrote:
>
> > Does anyone know how to add buttons dynamically? For example, on
> > iPhoto
> > there are albuns on the left bar. I think they are buttons. What are
> > them
> > and how can I add it dynamically?
>
> --
> 定魅刀利
> Dimitri Bouniol
> email@hidden
> http://web.mac.com/dimitri008/
>
>
>
>
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden