• 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: "Reveal Drawer" button in title bars
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: "Reveal Drawer" button in title bars


  • Subject: Re: "Reveal Drawer" button in title bars
  • From: Guy English <email@hidden>
  • Date: Mon, 23 May 2005 13:05:53 -0400

Hey,

    That control in the Finder is, as has been pointed out, crappy.
Don't do it. Having said that there's lot's of apps that do something
simillar - place a control in the titlebar. Safari, for example, will
put a little lock button in the top right of the titlebar when you're
looking at a secure page. If you're determined that this is the UI you
want to make here's some code that can guide you. This puts a
non-deterministic progress indicator ( the little spinning one ) into
the titlebar.

    {
        NSButton *zoomButton;
        zoomButton = [window standardWindowButton: NSWindowZoomButton];
        [[zoomButton superview] addSubview: spinner];
        [spinner setFrame: NSMakeRect(
                                       NSMaxX( [[zoomButton superview]
frame] ) - ([spinner frame].size.width + 5.0f),
                                       NSMinY( [zoomButton frame]  ) + 1,
                                       [spinner frame].size.width,
                                       [spinner frame].size.height )];

        [spinner setUsesThreadedAnimation: YES];
    }

It works by getting one of the standard window titlebar buttons ( in
this case the zoom button but it's pretty arbitrary ) and gets it's
superview - which is the titlebar itself. It then stick adds the
spinner control as a subview of the title bar and positions it at the
right hand side. You'll probably want to put some kind of button in
there - don't use the lozenge button thing because it'll confuse and
annoy people.

Hope that helps,
Guy
 _______________________________________________
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: 
 >RE: "Reveal Drawer" button in title bars (From: Jeff Laing <email@hidden>)

  • Prev by Date: NSDocument and NSWindow
  • Next by Date: Re: How to get an NSWindow from an NSDocument?
  • Previous by thread: Re: "Reveal Drawer" button in title bars
  • Next by thread: RE: "Reveal Drawer" button in title bars
  • Index(es):
    • Date
    • Thread