On 10 Jul 2008, at 19:33, Seth Willits wrote:


Has anyone created a custom window like the event info editor in iCal in 10.5? There's a few things I'm not sure how to do:

1) Drawing the window background gradient is pretty straightforward, but creating the thin border on the window is not. I'm concerned about not being getting it "thin" enough. Any tips on that?

2) The zoom-in effect. I'm going to go out on a limb here and say that this is probably done using private methods. The only public way I can think of to do it would be to grab an image of my window using the CGWindow API while the window is still hidden, then scale that in an overlay window for the effect.


I can come up with solutions for both of these, but I was hoping someone might have some better ideas or experience.


I'm working on one at the moment.  This may help you on your way

http://developer.apple.com/samplecode/RoundTransparentWindow/index.html

just draw whatever you want in -drawRect:, like a rounded rect or something.

The arrow is harder. There's a window with an arrow on Matt Gemmell's site http://mattgemmell.com/ but that uses an NSColor with a pattern image to fill the window background and that seems mess up with core animation, which can't cache the drawn window prior to animation.

HTH

Jon

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to