• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Adding GUI components dynamically
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

References: 
 >Adding GUI components dynamically (From: "Thiago Rossi" <email@hidden>)
 >Re: Adding GUI components dynamically (From: Dimitri Bouniol <email@hidden>)

  • Prev by Date: Re: Charting API?
  • Next by Date: Re: [NSOutlineView] How to know an item is expanded if its parent item is not?
  • Previous by thread: Re: Adding GUI components dynamically
  • Next by thread: Re: Adding GUI components dynamically
  • Index(es):
    • Date
    • Thread