|
From: | Raffael Herzog |
Subject: | Re: problem with autoresize |
Date: | Mon, 26 Jan 2004 16:23:51 +0100 |
User-agent: | Opera7.23/Linux M2 build 518 |
I've a NSBrowser in a NSWindow (I don't use Gorm) and I want the browser to resize automatically when the window is resized. In order to do this, I use the code :theBrowser = [[NSBrowser alloc] init]; [theBrowser setFrame: [[theMainWindow contentView] frame]]; [theBrowser setAutoresizingMask: NSViewWidthSizable || NSViewHeightSizable]; [[theMainWindow contentView] addSubview: theBrowser];
`||' ist the logical OR operator, you need the bitwise one (`|'). Therefore you set the autoresizingMask to 1 instead of 18.
cu, Raffi --The difference between theory and practice is that in theory, there is no difference, but in practice, there is.
Raffael Herzog - herzog@raffael.ch - www.raffael.ch - ICQ #67961355
[Prev in Thread] | Current Thread | [Next in Thread] |