Re: addSubview: and positioning at the bottom of a NSWindow
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