• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Appropriate size for a window.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Appropriate size for a window.


  • Subject: Re: Appropriate size for a window.
  • From: Uli Kusterer <email@hidden>
  • Date: Wed, 24 May 2006 15:39:19 +0200

Am 22.05.2006 um 19:28 schrieb Matteo Manferdini:
Hi everyone. I am crwating my app on a widescreen iMac G5, with a 17'' monitor. My app needs to have a window as large as possible, because it contains lots of things to display. It also has a drawer on a side.
How can I be sure that the window will be of the right size even on macs without a widescreen monitor?

You're giving very little information, so all I can provide are guesses, by popularity:


1) Your window shouldn't contain so much stuff that it needs a 17" monitor. Try to rethink your GUI (feel free to drop by the Mac-GUI- Dev Yahoo Group if you want some people to help you with that).

2) If your window contents become that large because the user may add lots of data (i.e. your window is a list of stuff), you may want to use a scroll view. That way, your users can resize the window to fit whatever screen they have, but they'll be able to scroll the rest into view.

3) You could distribute your window's contents across several windows. That way, users could open only the windows they need right now and make those larger than they could if everything had to be open

4) Find out what screens your typical user is running, and use a lowest-common-denominator metric. Subtract from that the size of the menu bar and make sure your window isn't larger than that (it may help to draw a rectangle of the correct size into an image file and use that as your desktop background so you can always see whether the window fits that imaginary minimal screen).

5) You could use a dynamically scaling layout. Use NSScreen to find out how much visible rectangle is available, make your window that large and proportionally size your window content to fit the available area in code. However, this should rarely be necessary. It also won't necessarily work for all controls, as not all of them scale continuously. Some just come in two or three default sizes. Also, you have to be careful to work correctly with multiple screens, or people that just have two small screens will get a tiny window on one of them even though they could fit the large one across their screens.

6) In general, I'd suggest not to do any fixed sizes as much as you can. Let people resize their window to the size they want. You can set the zoom rectangles for your window to default to the best size to show all data it contains, and you can set up the resize springs in Interface Builder to have your window contents fill the window as best as possible within the constraints you specify.

Cheers,
-- M. Uli Kusterer
http://www.zathras.de


_______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >Appropriate size for a window. (From: Matteo Manferdini <email@hidden>)

  • Prev by Date: Re: What encoding to use to turn NSData from a subprocess into an NSString?
  • Next by Date: NSImage Gradient Mask
  • Previous by thread: Re: Appropriate size for a window.
  • Next by thread: Initting "enabled" binding for button
  • Index(es):
    • Date
    • Thread