🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.next.programmer
Article #2077

Re: How to limit window size of app

#2077
From: William Barker
Date: Tue, 15 Dec 1992 20:25
63 lines
2707 bytes
In article <1992Dec15.175215.13932@dtint.uucp> nevin@dtint.dtint.com  
writes:
> In article <1992Dec13.222309.16899@serveme.chi.il.us>  
datec@gagme.chi.il.us  
> (Charles Robinson) writes:
> > William Barker (wrb@ulnar.biostr.washington.edu) wrote:
> > : Hej,
> > : 
> > : Hopefully an easy question that I'm too lazy to look up for myself:
> > : 
> > : How does one limit the size of an app's window?  For example, not  
letting  
> > : the user resize a main window to less than a certain size, or more  
than a  
> > : certain size.
> > : 
> > : Hope this is an easy one.
> > :
> > Certainly is --- look at the code in DrawDocument.m method  
windowDidResize
> > in the Draw example. Basically you just apply the constants you want  
to
> > to width & height after the user has made his attempt at resizing. 
> 
> No, no, no.  This is the old solution.  While this was easy, it is now  
even  
> easier.  Under 3.0, just send the window a '-setMinSize:' message (or  
> '-setMaxSize:', whichever is relevant).
> 
> --
> Nevin Pratt, Digital Technology, Int'l    Orem, Ut
> NeXTmail preferred, but ONLY at my REAL email address:  
nevin@dtint.dtint.com
> 
> -- 
> ---
> root	                               root@dtint.dtint.com
> Digital Technology Int.                (801)226-2984	
> 500 W. 1200 South, Orem UT, 84057      FAX (801) 226-8438

Thanks to all who answered my original post, both the email responders and  
the Net repsonders.  

Most of the responses were programming related.  That's not a problem, but  
there is an real easy way to limit the small end of the window size:  See  
the Size inspector panel in IB, when inspecting the window you want to  
limit.  There's a Minimum size feature that you can either set to you own  
coords, or there's a button that sets the coords to the window's current  
size.  Very handy. 

So, at least half the answer was to be found in IB.  As it happens, that's  
the answer I was after.

Again, thanks to all the responders.

And now back to your original programming....

bb 

--
Bill Barker--Biological Structure--University of  
Washington--Seattle--WA--98195
(206) 543-7315
Technical Details
Message-ID: <1992Dec15.202538.18129@u.washington.edu>
Path: arc1-ca.pugleaf.net!sparky!uunet!zaphod.mps.ohio-state.edu!uwm.edu!ogicse!news.u.washington.edu!news
References: <1992Dec15.175215.13932@dtint.uucp>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!zaphod.mps.ohio-state.edu!uwm.edu!ogicse!news.u.washington.edu!news
From: wrb@ulnar.biostr.washington.edu (William Barker)
Newsgroups: comp.sys.next.programmer
Subject: Re: How to limit window size of app
Message-ID: <1992Dec15.202538.18129@u.washington.edu>
Date: 15 Dec 92 20:25:38 GMT
Article-I.D.: u.1992Dec15.202538.18129
References: <1992Dec15.175215.13932@dtint.uucp>
Sender: news@u.washington.edu (USENET News System)
Organization: University of Washington
Lines: 63