• 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: removing minimize and zoom widgets from tool palette title bar
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: removing minimize and zoom widgets from tool palette title bar


  • Subject: Re: removing minimize and zoom widgets from tool palette title bar
  • From: John Richetta <email@hidden>
  • Date: Sun, 21 Oct 2007 03:51:29 -0700

At 7:15 PM -0700 10/19/07, Shaun Wexler wrote:
On Oct 19, 2007, at 6:05 PM, Fritz Anderson wrote:

It's pretty simple. Once you have the window button in question, you should be able to just send it a -removeFromSuperview: message. You may also need to update the window's style mask for the layout to be done correctly.

I haven't tested this, but the poster, John C. Randolph, is extremely reliable.

However, upon removal, the title bar drag region is not properly updated, so you are left with some "dead spots".

The problem noted by Shaun is unfortunate. I can't actually reproduce it, as when I send the widgets a removeFromSuperview message, execution halts soon after with an exception (unrecognized selector during forwarding).


I've found what seems like a reasonable work-around: set the origin of the widgets you'd like to hide to something way out of view, like (-500, -500). Doing this correctly updates the drag region. Note that the more obvious and clean approach of hiding the controls has the problem Shaun mentioned (drag region still has holes in it).

There are two issues with this hack:

1. The close box still highlights when you move the mouse over the region where the minimize and zoom widgets normally are, when visible (but disabled). This matches "normal" behavior, but looks weird since there is nothing underneath the mouse (and so the highlighting tends to violate good UI principles).

2. If you do anything to the window/panel frame after "hiding" the widgets - voilá! - they will become visible again (so set the window frame first, if possible). Curious that the system does this, no?

Of course, the usual caveat applies: this is probably not supported by Apple, or guaranteed to work in the future.

-jar

P.S. - I guess if we could remove the widgets from their superviews successfully, after moving them out of view, this would probably fix problem #2?
_______________________________________________


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: 
 >removing minimize and zoom widgets from tool palette title bar (From: John Richetta <email@hidden>)
 >Re: removing minimize and zoom widgets from tool palette title bar (From: Fritz Anderson <email@hidden>)
 >Re: removing minimize and zoom widgets from tool palette title bar (From: Shaun Wexler <email@hidden>)

  • Prev by Date: Re: revisiting NSTableView 'on drag' row highlighting
  • Next by Date: Re: Question Mark Cursor
  • Previous by thread: Re: removing minimize and zoom widgets from tool palette title bar
  • Next by thread: insertObject:in<myManagedObject>AtIndex:
  • Index(es):
    • Date
    • Thread