• 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: NSToolbar's setVisible and resizing parent window
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSToolbar's setVisible and resizing parent window


  • Subject: Re: NSToolbar's setVisible and resizing parent window
  • From: Andy Lee <email@hidden>
  • Date: Thu, 18 Apr 2002 22:59:43 -0400

At 1:44 PM -0400 4/18/02, Mike Pinkerton wrote:
I've noticed that calling setVisible on a NSToolbar will resize the parent window as it shows and hides the toolbar. Is there any way (private or public) to turn off this behavior? Some private method to override?

I only know NSToolbar from the docs I've read, but I would try creating a subclass of NSToolbar. I would override -setVisible: to do the following:

- Remember the window's -isAutodisplay property.
- Tell the window to -setAutodisplay:NO.
- Remember the window's size.
- Call the inherited -setVisible:.
- Restore the window's remembered autodisplay property.
- Set the window's size to the remembered dimensions.

The NSToolbar would have to know what window it belongs to. I don't know exactly how to do that, but you can always add an instance variable if there is no cleverer way.

--Andy
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

References: 
 >NSToolbar's setVisible and resizing parent window (From: email@hidden (Mike Pinkerton))

  • Prev by Date: Setting environment variables for Project Builder
  • Next by Date: Checking if volume is busy?
  • Previous by thread: NSToolbar's setVisible and resizing parent window
  • Next by thread: Problem with dynamically generated menu
  • Index(es):
    • Date
    • Thread