Re: Adding GUI components dynamically

2008-03-03 Thread Jens Alfke
On 1 Mar '08, at 2:07 PM, Dimitri Bouniol wrote: Easy. Create an instance of a NSButton: NSButton *myButton = [[NSButton alloc] initWithFrame:nsRectOfButton]; Then add it to your view: [view addSubview:myButton]; I would recommend against doing this, for several reasons: 1. Last time I trie

Re: Adding GUI components dynamically

2008-03-01 Thread Thiago Rossi
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 PROTECTED]> wrote: > Easy. Create an instance of a NSButton: > NSButton *myButton = [[NSButton alloc] initWithFrame:nsRectOfButton]; > > Then add it to your view: >

Re: Adding GUI components dynamically

2008-03-01 Thread Dimitri Bouniol
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 configura

Adding GUI components dynamically

2008-03-01 Thread Thiago Rossi
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? ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post