• 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: [Q] Hiding zoom & minimize buttons
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Q] Hiding zoom & minimize buttons


  • Subject: Re: [Q] Hiding zoom & minimize buttons
  • From: glenn andreas <email@hidden>
  • Date: Wed, 22 Oct 2008 13:41:35 -0500


On Oct 22, 2008, at 10:13 AM, Eric Gorr wrote:


On Oct 22, 2008, at 10:53 AM, Michael Ash wrote:

On Wed, Oct 22, 2008 at 10:36 AM, Eric Gorr <email@hidden> wrote:
I found this old thread:

http://lists.apple.com/archives/cocoa-dev/2006/Mar/msg01864.html

and I would like to know the same thing. Unfortunately, the old thread did
not conclude with an answer.


While it is possible to obtain the button by doing:

NSButton *miniaturizeButton = [myWindow
standardWindowButton:NSWindowMiniaturizeButton];
[miniaturizeButton removeFromSuperview];

this results in a crash.

First, I highly recommend against doing this. If Cocoa keeps them present but disabled then you ought to stick with that

As was mentioned in the old thread, according to the HI Guildlines, it is perfectly acceptable to not have those buttons. Furthermore, it is quite common in several applications for a window to not have a miniaturize or zoom button...particularly NSPanels (they are Windows).


But, in any case, minutes after I posted this, I found an answer:

NSButton *miniaturizeButton = [myWindow standardWindowButton:NSWindowMiniaturizeButton];
[miniaturizeButton setHidden:YES];


while it doesn't appear that one can create a window without these buttons, it is trivial to hide them.


The last time I tried something like that (and this behavior may have changed since then), it left a "hole" in the tracking area of the title-bar where the button was, resulting in a dead area that looks like you should be able to move the window, but you can't, which turned out to be quite frustrating (this was one of those "narrow windows that didn't need those controls so remove it so there would be more room for the title and window dragging" cases).



Glenn Andreas email@hidden
<http://www.gandreas.com/> wicked fun!
quadrium2 | build, mutate, evolve, animate | images, textures, fractals, art



_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >[Q] Hiding zoom & minimize buttons (From: Eric Gorr <email@hidden>)
 >Re: [Q] Hiding zoom & minimize buttons (From: "Michael Ash" <email@hidden>)
 >Re: [Q] Hiding zoom & minimize buttons (From: Eric Gorr <email@hidden>)

  • Prev by Date: Re: Get text width outside a view
  • Next by Date: LSUIElement application and coming to the front
  • Previous by thread: Re: [Q] Hiding zoom & minimize buttons
  • Next by thread: Re: [Q] Hiding zoom & minimize buttons
  • Index(es):
    • Date
    • Thread