Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSButton Behaviors



Making progress here, but I came up with another question.

This might be unusual, but there is a reason for the behavior I am trying to achieve -- it works with my interface, trust me!


I need to create a button that shows its alternate image while the button is down and the normal image when the button is released. The "Momentary Change" mode does this.


HOWEVER, I also need a bound variable (or some similar notification method back to the program) to be set based on whether or not the button is highlighted -- like a "Toggle" button -- rather than just triggering an action on button release.

I can't identify any of the standard modes that will do this.

Does this require subclassing NSButton, or is there some other clever way to accomplish this feat which I'm currently missing?


Any hints would be appreciated...

Thank you!


----------------------------------------------------------- Frank D. Engel, Jr. <email@hidden>

$ ln -s /usr/share/kjvbible /usr/manual
$ true | cat /usr/manual | grep "John 3:16"
John 3:16 For God so loved the world, that he gave his only begotten Son, that whosoever believeth in him should not perish, but have everlasting life.
$


_______________________________________________

Cocoa-dev mailing list (email@hidden)

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/email@hidden

This email sent to email@hidden


Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.