• 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: Making NSBox programmatically
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Making NSBox programmatically


  • Subject: Re: Making NSBox programmatically
  • From: Julian Cain <email@hidden>
  • Date: Mon, 13 Feb 2006 21:51:02 -0500

Another note is that you may want to keep these NSBox objects in an array so you get get them and remove them as well as have access so you can say get the bounds of [[myBoxes objectAtIndex:2] bounds] So ideally you need to set up an object model for this.

~Julian Cain
email@hidden



On Feb 13, 2006, at 9:30 PM, Alan Smith wrote:

I need to make a box through code and not through IB. The idea's to add a
NSBox to place an icon in when the user presses a button, like the dock when
you drag an app/folder on to it; it expands. I can expand the window with
setContentSize, and that works fine. But I can't figure out how to create
the box and place it.
Okay, here is the window, ignore the " ' ", they're just to make it look
good.


Window:
---------------------
| |----------------| |
| |                | |
| |     The'     | |
| |     Box'     | |
| |----------------| |
---------------------

Nice, no? Okay, there's the window and a NSBox inside it. Now I want to
create another box when the user press's a button.


----------------------------------------
| |----------------| |----------------| |
| |                | |                | |
| |     The'     | |     The'     | |
| |     Box'     | |     Box''    | |
| |----------------| |----------------| |
----------------------------------------

Now I can, like I said, expand the window easily, but the creation of the
box is the difficult part. Once created how do I get it to line up with the
other box?


Okay that's all for tonight, it's getting late.
Thanks in advance, Alan
 _______________________________________________
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
References: 
 >Making NSBox programmatically (From: Alan Smith <email@hidden>)

  • Prev by Date: Making NSBox programmatically
  • Next by Date: Re: Making NSBox programmatically
  • Previous by thread: Making NSBox programmatically
  • Next by thread: Re: Making NSBox programmatically
  • Index(es):
    • Date
    • Thread