[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: problem with autoresize

From: Nicola Pero
Subject: Re: problem with autoresize
Date: Mon, 26 Jan 2004 15:36:48 +0000 (GMT)

> Hello,
> 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];
> But when I resize the window, the browser's size doesn't change and the 
> browser stay at the bottom right of the window.
> What is the mistake ?

It should be 

NSViewWidthSizable | NSViewHeightSizable

and not 

NSViewWidthSizable || NSViewHeightSizable

with that change, it should work (I double-checked, it works for me) :-)

reply via email to

[Prev in Thread] Current Thread [Next in Thread]