• 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: Custom preview for NSOpenPanel
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Custom preview for NSOpenPanel


  • Subject: Re: Custom preview for NSOpenPanel
  • From: Ron Fleckner <email@hidden>
  • Date: Mon, 4 Jun 2007 20:19:12 +1000

From: Anton Spivak <email@hidden>


Hello!

My application uses a non standard file format. I would like to provide
preview of such file type in the NSOpenPanel window. Is there a way to do it
in Cocoa?


Thanks,

Anton.

Hello Anton,

on Panther and higher, you can get the path to the selected file in the open panel without needing the user to click 'Open'. You can have a NSView subclass to add to the open panel via setAccessoryView: (from NSOpenPanel's super class, NSSavePanel). Whatever you have in your view subclass will appear as a pane inside a box at the bottom of the open panel. So you just need to set up your view subclass to be able to handle displaying a preview of your 'non standard file', and Bob's your uncle, as they say.

Ron
_______________________________________________

Cocoa-dev mailing list (email@hidden)

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


  • Follow-Ups:
    • Re: Custom preview for NSOpenPanel
      • From: "Sean McBride" <email@hidden>
  • Prev by Date: NSButtonCell inside custom NSCell not responding to mouse events
  • Next by Date: Re: NSButtonCell inside custom NSCell not responding to mouse events
  • Previous by thread: Custom preview for NSOpenPanel
  • Next by thread: Re: Custom preview for NSOpenPanel
  • Index(es):
    • Date
    • Thread