Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: adding new NSButtons to an application "on the fly"



Well buttons are fairly simple objects. You can create as many as you like:

-[NSButton initWithFrame:]

and add them to a window

[[myWindow contentView] addSubview:button]

Alternatively, you could use an NSMatrix of NSButtonCells to do the job.

Mike

On 30 Apr 2007, at 11:26, Tim Simon wrote:

Hi all.
I have been thinking of starting a project which will basically be a
lot of buttons which, when clicked, will run a script for a remote
server via ssh. I want to know if it is possible for me to build the
program in such a way taht i will be able to add or remove buttons as
i go, without havign to use xtools? Maybe using a file which would
record what buttons i have "opened", and then when the program is
initiated it would read the file, and create those buttons. That way,
i can have a button for each script, and when i need another i can add
it, when i dont need it i can deleate it?
Is this possible, (i sortof figure its not the easiest or most
efficient way of doing this) and how would i implement this?
_______________________________________________

Cocoa-dev mailing list (email@hidden)

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:
http://lists.apple.com/mailman/options/cocoa-dev/cocoadev% 40mikeabdullah.net


This email sent to email@hidden

_______________________________________________

Cocoa-dev mailing list (email@hidden)

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:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden


Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.