Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to Create And Display a Custom Sheet in Cocoa? [closed]

Tags:

cocoa

This is a newbie question!

How to Create And Display a Custom Sheet in Cocoa? (like "Add Bookmark" sheet in Safari - see below)

  • What are the steps involved in the task?
  • How to accomplish each step?
  • Can you point out a good step-by-step article?

alt text http://grab.by/2oWw

like image 538
Daniel Silveira Avatar asked Nov 05 '22 16:11

Daniel Silveira


1 Answers

All you need to do is make a nib file containing an NSWindow that you want to use as the sheet, and load it up. Check out Using Custom Sheets in the docs.

NSApplication has a method to let you load the sheet up:

beginSheet:modalForWindow:modalDelegate:didEndSelector:contextInfo:

This page has some more information and what I'd consider an easier way to set up the sheet - making it a panel or window inside the same nib file as your document window.

like image 134
Carl Norum Avatar answered Nov 12 '22 15:11

Carl Norum