objective c - Window does not grow to accommodate when I replace a placeholder NSView with a big view -
i have little windows button on , little placeholder cusom nsview, when button clicked reaplce the custom view created out of xib file.
the new view shows fine cropped because of smaller window size. how can create window grow wide much new view fits in..
// code written within controller _connectwindow pointer window there button , _custom place holder. _progview nsview loading xib file
-(ibaction)connect:(id)sender { if(!_progview) { [nsbundle loadnibnamed:@"connectionstatusview" owner:self]; } [[_connectionwindow contentview] replacesubview:_custom with:_progview];
i appreciate more specfic response, have read article http://developer.apple.com/library/mac/#documentation/cocoa/conceptual/cocoaviewsguide/workingwithaviewhierarchy/workingwithaviewhierarchy.html did not help much
i don't think need replacesubview:with:
here. looks should using addsubview:
. can resize window setting frame: setframe:display:
or setframe:display:animate:
.
objective-c osx cocoa
No comments:
Post a Comment