Re: How to create and show an NSButton programmatically?
Re: How to create and show an NSButton programmatically?
- Subject: Re: How to create and show an NSButton programmatically?
- From: Ivan Kourtev <email@hidden>
- Date: Sun, 5 Feb 2006 21:04:01 -0500
Thanks, this works and now I am making progress.
-- ivan
On Feb 5, 2006, at 5:49 PM, Scott Anguish wrote:
initWithFrame: is the designated initializer for NSButton.
Basically, you're not saying where you want the button to be placed
in the superview (contentView)
On Feb 5, 2006, at 5:30 PM, Ivan Kourtev wrote:
Hello,
I am having trouble creating and showing a button (instance of
NSButton) on a window programmatically? I have tried allocating
and initializing the button with something along the lines of:
NSButton *button = [[NSButton alloc] init];
[button setButtonType:NSMomentaryPushInButton];
[[newWindow contentView] addSubview:button];
[button setNeedsDisplay:YES];
and although I get no errors or warnings (at compile or run time)
I am not able to make the button show up.
I searched the documentation and it doesn't speak much of doing
what I am doing so perhaps this is not the preferred way of doing
what I want to do? What am I missing here?
Thanks for any help,
--
ivan
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden