• 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: addSubview: and positioning at the bottom of a NSWindow
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: addSubview: and positioning at the bottom of a NSWindow


  • Subject: Re: addSubview: and positioning at the bottom of a NSWindow
  • From: Chase Meadors <email@hidden>
  • Date: Mon, 3 Aug 2009 14:19:27 -0500

Consider using NSDrawer. It can contain a content view (i.e. your info view) and can be attached to any side of a parent window, and be shown or hidden.

If you don't want to use this, however, just grab the content view's frame,

NSRect r = [[window contentView] frame]

and then call:

[[window contentView] setFrame:NSMakeRect(r.origin.x, r.origin.y, r.size.width, r.size.height + *however much you need*)];

Then set the frame of your subview and add it.

On Aug 3, 2009, at 1:51 PM, Stefano Pigozzi wrote:

Hello,

I'm trying to do something simple, I have a NSWindow containing a NSTableView that resizes with the with the window. When I click on one element I want to display additional information in a subView that I'm adding with [[theWindow contentView] addSubview:infoView];
The problem is when I do this the infoView is overlapped with the scrollView. How can I make it appear below the other views in the window? (maybe making the window grow in size). Some code examples or pointers would be great. (http://i31.tinypic.com/2wf1f95.jpg this is what it should look like after adding the subview)


Thank you for your time.
stefano
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please 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:
This email sent to email@hidden

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please 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:
This email sent to email@hidden


  • Follow-Ups:
    • Re: addSubview: and positioning at the bottom of a NSWindow
      • From: Stefano Pigozzi <email@hidden>
References: 
 >addSubview: and positioning at the bottom of a NSWindow (From: Stefano Pigozzi <email@hidden>)

  • Prev by Date: Fwd: Table view data source methods order?
  • Next by Date: Extending Undo Group with delay creates "invalid state" -- Why?
  • Previous by thread: addSubview: and positioning at the bottom of a NSWindow
  • Next by thread: Re: addSubview: and positioning at the bottom of a NSWindow
  • Index(es):
    • Date
    • Thread