Creating Toolbars for Mac OS X
Subject:   Sizing toolbarItems after window/panel resize
Date:   2007-03-09 07:42:45
From:   slashlos
Good tutorial; I believe I've digested this somewhat but want to see it continued regarding resizing. I'd like my searchView to widen as the panel/display widens, so I added this to my views delegate:

- (void)windowDidResize:(NSNotification *)note
NSRect windRect = [window frame];
NSRect searchRect = [searchView frame];
searchRect.size.width = windRect.size.width;

[searchItem setMinSize:searchRect.size];
[searchItem setMaxSize:searchRect.size];

[searchView setFrame:infoRect];
[searchView setNeedsDisplay:YES];

The view sizes but its display gets clipped to its original size? My search view has more stuff in it than a single searchField all contained in an NSBox but I am trying to have the whole thing grow/shrink as the window does?
/los "I was a teenage net-random"