How to create and show an NSButton programmatically?
How to create and show an NSButton programmatically?
- Subject: How to create and show an NSButton programmatically?
- From: Ivan Kourtev <email@hidden>
- Date: Sun, 5 Feb 2006 17:30:02 -0500
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