Re: Making NSBox programmatically
Re: Making NSBox programmatically
- Subject: Re: Making NSBox programmatically
- From: Alan Smith <email@hidden>
- Date: Tue, 14 Feb 2006 12:20:42 -0500
Okay! Great! You've all saved the day, thanks! I'm going to mess around with
this cool code and see what happens; it should work out fine. But I'll email
again if I have any further problems. By the way, if someone who reads this
wants something to do, they're are more then welcome to help me. The app
will be open source so you wouldn't get paid, but it would be fun.
Thanks again, Alan
On 2/13/06, John C. Randolph <email@hidden> wrote:
In whatever object that's getting the message from the button, do
> something like this:
>
> id firstBox;
> id newBox;
> ...
> NSRect newBoxFrame = [firstBox frame];
> newBoxFrame.origin.x += NSWidth(newBoxFrame); // Shift it along the
> X axis.
> newBox = [[NSBox alloc] initWithFrame:newBoxFrame]; // create the
> new NSBox instance
> [[firstBox superview] addSubview:newBox]; // Insert it into the view
> hierarchy
>
> -jcr
>
>
>
_______________________________________________
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